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   Go Down

Author Topic: Lire des FLV dans coppermine  (Read 71358 times)

0 Members and 1 Guest are viewing this topic.

easyjava

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
  • Be Tresh
Lire des FLV dans coppermine
« on: February 12, 2007, 09:40:18 pm »

--- Post original : http://forum.coppermine-gallery.net/index.php?topic=34182.msg187744 ---

Voici un tuto pour pouvoir ajouter des vidéos au format flv dans votre gallerie coppermine.

1 - Exécuter cette requête sql dans votre base de donnée :
Code: [Select]
INSERT INTO `cpg145_filetypes` ( `extension` , `mime` , `content` , `player` ) VALUES ('flv', 'application/x-shockwave-flash', 'movie', 'SWF');
Cela ajoutera la nouvelle extention flv à coppermine.

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

        $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";
    }
Remplacer par :
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  = "<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";

}
    }
Si vous ne trouvez pas le code ci-dessus dans votre fichier theme.php trouvez ceci :
Code: [Select]
?>
et ajoutez en dessus :
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);
}

3 - Trouvez ceci :
Code: [Select]
$pic_html  = '<object id="'.$player['id'].'" '.$player['classid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
et remplacez le par :
Code: [Select]
$pic_html  = '<object id="'.$player['id'].'" '.$player['clsid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';

4 - Téléchargez le lecteur flv flash de jeroenwijering ICI et uploadez "flvplayer.swf" à la racine de votre galerie. (http: //votre-galerie.zut/flvplayer.swf)

5 - Ajoutez votre flv à Coppermine comme vous le feriez pour une image  ;)

NB N'oubliez pas que pour les miniatures il faut créer une jpg et la nommer thumb_NOMDEVOTREFLV.jpg
NB 2 Pour ajouter un watermarking à votre vidéo vous pouvez éditer le fichier source du lecteur flash présent dans le package et y ajouter un claque avec votre image puis réexporter le lecteur en swf.

Amusez vous bien !
« Last Edit: August 13, 2007, 12:12:37 am by PYAP »
Logged

François Keller

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Lire des FLV dans coppermine
« Reply #1 on: February 13, 2007, 07:29:23 am »

Merci de cette traduction.

Attention de bien remplacer le préfixe de table par celui de votre propre galerie 'ici cpg145_ mais ce peut être autre chose chez vous)
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

qwest

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Lire des FLV dans coppermine
« Reply #2 on: March 25, 2007, 04:18:55 pm »

Quote
5 - Ajoutez votre flv à Coppermine comme vous le feriez pour une image  Wink

Humf.. avec le xp_publish, ca marche pas ? j'ai toujours uploadé avec ça...  ;D
Logged

François Keller

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Lire des FLV dans coppermine
« Reply #3 on: March 25, 2007, 04:33:41 pm »

Quote
Humf.. avec le xp_publish, ca marche pas ?
avez vous essayé ?
Si oui et que ç ane marche pas, essayez avec une autre manière d'uploader  ;)
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

easyjava

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
  • Be Tresh
Re: Lire des FLV dans coppermine
« Reply #4 on: March 26, 2007, 01:38:13 pm »

Moi j'upload par ftp et je ne rencontre aucun soucis !
Logged

easyjava

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
  • Be Tresh
Re: Lire des FLV dans coppermine
« Reply #5 on: March 29, 2007, 02:29:48 pm »

Attention, une nouvelle version du Flash player est sortie et elle ne fonctionne plus avec le script php indiqué. Il faut attendre quelques jours et je mette à jour tout ça !

Bonne nouvelle
Pour ceux qui utilisent le Stramm mod pack il y aura le watermarking dynamique !
Logged

easyjava

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
  • Be Tresh
Re: Lire des FLV dans coppermine
« Reply #6 on: March 29, 2007, 03:35:29 pm »

Trouver dans votretheme/theme.php

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

Et remplacer par UNIQUEMENT SI VOUS AVEZ LE STRAMM MODPACK

Code: [Select]
   
$flv =  $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
$result = mysql_query("select value from {$CONFIG['TABLE_CONFIG']} where name = 'watermark_file'") or die('error : '.mysql_error());
$row = mysql_fetch_array($result);
$pic_html  = "
<p id=\"player\">
<script type=\"text/javascript\">
var FO ={movie:\"flvplayer.swf\",width:\"480\",height:\"360\",majorversion:\"7\",build:\"0\",bgcolor:\"#FFFFFF\",allowfullscreen:\"true\",flashvars:\"file=$flv&logo=".$row["value"]."&autostart=true\" };
UFO.create(FO,\"player\");
</script>
<br />\n";

Sinon remplacez par :


Code: [Select]
   
$flv =  $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
$pic_html  = "
<p id=\"player\">
<script type=\"text/javascript\">
var FO ={movie:\"flvplayer.swf\",width:\"480\",height:\"360\",majorversion:\"7\",build:\"0\",bgcolor:\"#FFFFFF\",allowfullscreen:\"true\",flashvars:\"file=$flv&autostart=true\" };
UFO.create(FO,\"player\");
</script>
<br />\n";

Ceci fonctionnera si vous mettez le nouveau lecteur disponible dans l'archive disponible ici http://www.jeroenwijering.com/?item=Flash_Video_Player
Si vous avez le Stramm Pack installé le watermarking se fera comme par magie !

Amusez vous bien
Logged

Pascal YAP

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Lire des FLV dans coppermine
« Reply #7 on: April 06, 2007, 04:51:16 pm »

Bonjour,

  Tel que déclaré, les vidéos ne s'affichent pas avec ma configuration !
J'ai dû modifier 2 lignes (?autoStart=false) :

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

en :

Code: [Select]
    $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\">";
    $pic_html .= "<param name=\"movie\" value=\"flvplayer.swf?file=$flv\" />";
    $pic_html .= "<param name=\"wmode\" value=\"transparent\" />";
            $pic_html .= "</object><br />\n";

Maintenant c'est OK  ;D
Exemple perso

PYAP
« Last Edit: April 06, 2007, 04:57:05 pm by PYAP »
Logged

easyjava

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
  • Be Tresh
Re: Lire des FLV dans coppermine
« Reply #8 on: April 09, 2007, 06:17:45 pm »

C'est étrange car chez moi l'auto start fonctionne bien. As tu uploadé le ufo.js ?
Logged

easyjava

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 120
  • Be Tresh
Re: Lire des FLV dans coppermine
« Reply #9 on: April 09, 2007, 06:24:25 pm »

Bonjour,

  Tel que déclaré, les vidéos ne s'affichent pas avec ma configuration !
J'ai dû modifier 2 lignes (?autoStart=false) :

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

en :

Code: [Select]
    $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\">";
    $pic_html .= "<param name=\"movie\" value=\"flvplayer.swf?file=$flv\" />";
    $pic_html .= "<param name=\"wmode\" value=\"transparent\" />";
            $pic_html .= "</object><br />\n";

Maintenant c'est OK  ;D
Exemple perso

PYAP

heu je viens de voir quelque chose de bizzare...
essaye de cette manière :

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

j ai remplacé le ? par un &
Logged

pixfamily

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
    • ma gallerie
Re: Lire des FLV dans coppermine
« Reply #10 on: August 09, 2007, 03:04:06 pm »

je suis aussi interrssé pour integré du flv a coppermine mais je bloc dejas sur la 1ere ligne :(



1 - Exécuter cette requête sql dans votre base de donnée :
Code: [Select]
INSERT INTO `cpg145_filetypes` ( `extension` , `mime` , `content` , `player` ) VALUES ('flv', 'application/x-shockwave-flash', 'movie', 'SWF');
Cela ajoutera la nouvelle extention flv à coppermine.

comment on fait ca "executer une requete" ??



Logged

Pascal YAP

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Lire des FLV dans coppermine
« Reply #11 on: August 09, 2007, 03:20:41 pm »

Quote
comment on fait ca "executer une requete" ??
On passe par PhpMyAdmin.
C'est avec ce logiciel installé par votre hébergeur ou vous-même (mais je ne crois pas que ce soit le cas ! )
Vous devez alors exécutez la commande SQL que vous citez.

Vous pouvez également utiliser le Plugin Add Files Type avec les mêmes indications que celles fournies. Mime-type etc :  'flv', 'application/x-shockwave-flash', 'movie', 'SWF'

PYAP
Logged

pixfamily

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
    • ma gallerie
Re: Lire des FLV dans coppermine
« Reply #12 on: August 09, 2007, 05:29:50 pm »

j'ai reussi a installer la requette sql , c'est dejas ca :)
Logged

pixfamily

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
    • ma gallerie
Re: Lire des FLV dans coppermine
« Reply #13 on: August 10, 2007, 11:39:35 am »

bon et bien j'ai rajouter tout ca apres "?>" de mon theme.php
j'ai uploader le player flv (le dossier "jw_flv_player)dans mon dossier coppermine (juste a coté des autres >album/bridge/doc etc..j'ai bien fait ??
avec le code si dessous ,j'ai une grosse partie de ce texte qui s'affiche en haut de ma page... ;D
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['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)
je peux malgres tout uploder un flv comme si je le faisait pour une image mais rien est visible ! pas meme le lecteur.

j'ai ensuite essayé en rajoutant simplement se code (a la suite de "?>") de mon theme php.
Code: [Select]
$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";
c'est pareil mais je n'ai plus de texte envahissant en haut de ma page.
un peu d'aide svp merci
Logged

Pascal YAP

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Lire des FLV dans coppermine
« Reply #14 on: August 10, 2007, 02:08:06 pm »

Quote
bon et bien j'ai rajouter tout ca apres "?>" de mon theme.php
Essayez de placer ce code avant ?>

PYAP
Logged

pixfamily

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
    • ma gallerie
Re: Lire des FLV dans coppermine
« Reply #15 on: August 10, 2007, 02:55:29 pm »

merci pyap
bon , ca c'est fait ,j'ai placer ce code avant "?>" dans le "theme.php" de mon theme.
Code: [Select]
$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";

je n'ai pas placer l'autre code pour l'instant.
dans l'etat actuel ,j'ai uploader mon .flv comme pour une image (avec succé  ;D)
le .flv uploadé se trouve bien charger dans : coppermine/albums/userpics/10001/video.flv

mais rien n'est visible , j'ai un cadre blanc , et si je fait un clik droit dessus j'ai "annimation non chargé" grisé...
je rame serieusement pour integré ce lecteur mais je pense ne pas etre tres loin.........patience ;D

Logged

Pascal YAP

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Lire des FLV dans coppermine
« Reply #16 on: August 10, 2007, 03:26:29 pm »

Bonjour,

Question sotte : avez-vous télécharger et placé le fichier suivant (le player) sur votre site ?
http://www.jeroenwijering.com/upload/flash_flv_player.zip
C'est indiqué dans le premier post de ce sujet.

PYAP
« Last Edit: August 10, 2007, 03:42:37 pm by PYAP »
Logged

pixfamily

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
    • ma gallerie
Re: Lire des FLV dans coppermine
« Reply #17 on: August 12, 2007, 09:37:41 pm »

oui biensur mais l'ai je bien placé au bon endroit...
j'ai mis le contenu de l'archive "jw_flv_player"dans coppermine:
(http://img442.imageshack.us/img442/9696/playswfuv7.jpg)
Logged

Pascal YAP

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Lire des FLV dans coppermine
« Reply #18 on: August 12, 2007, 11:10:00 pm »

Non non !

Il faut placer le contenu de l'archive ZIP contenant flvplayer.swf à la RACINE de votre CPG, et non déposer l'archive ZIP dans un sous-dossier de Albums  ???
Donc placer flvplayer.swf à la racine de votre installation Coppermine.

Pas grave... ça va finir par marcher  ;)

PYAP
Logged

pixfamily

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
    • ma gallerie
Re: Lire des FLV dans coppermine
« Reply #19 on: August 13, 2007, 12:32:47 am »

ca va finir par marcher ??...j'espere :-[ je fait tout pour :P
sur cette image, je pense quand meme etre bien a la racine du CPG et non pas dans un "sous dossier" de albums.
(http://img442.imageshack.us/img442/9696/playswfuv7.jpg)

j'ai placer dans CPG non pas le dossier zippé mais le contenu du zip (un dossier se nommant "jw_flv_player")
dans ce dossier jw_flv_player il y a d'autres dossiers et fichiers dont flv_player.swf:

(http://pix.nofrag.com/f/7/2/824f3ca6b0db2d9deca9335d174fa.jpg)

dailleur je remarque que des fichiers sont en double comme par exemple flvplayer .swf et .flvplayer.html
c'est certainement facile une fois qu'on sait mais ce n'est pas mon cas et j'aimerai bien y arriver.

j'avoue avoir des difficultée par manque de connaissance.

si "racine" c'est le contenu du CPG et bien j'ai bon sur l'image 1 ?
sinon cela serait la racine de mon espace perso donc avant le CPG.
patiente.... :P
je vais y arriver ;)

Logged
Pages: [1] 2 3 4   Go Up
 

Page created in 0.034 seconds with 20 queries.