Ignore:
Timestamp:
Sep 21, 2009, 10:03:23 PM (15 years ago)
Author:
tiico
Message:

Fix Bug 0001130
Possibility to add $confpiclens_videoext_thumb. Extensions in this array are display as thumb (content not show). Use to select videos file to show.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/piclens/generate_rss.php

    r3708 r3894  
    2121$py_addext = array("gvideo", "dm", "ytube", "wideo", "vimeo", "wat");
    2222$video_ext_piclens = array("flv");
    23 
     23if (isset($conf['piclens_videoext_thumb'])) // Conf file contains extensions to show as thumbnail. Others files will not be display (except previous ext)
     24    $videos_ext_other = $conf['piclens_videoext_thumb'];
     25else    // Conf not present, by default, list of file to display as thumb
     26    $videos_ext_other = array('mpg','avi','mp4','mov','wmv','divx','xvid','mpeg','3pg');
     27
     28   
    2429// Vérification présence et activation plugin SecureImages ET si actif, vérification d'activation de compatibilité
    2530$plugins_SecureImage_only = (get_db_plugins('active','secureImages') ? true : false );
     
    622627
    623628                        // Fichiers video  (Charlies content)
    624                         if ((in_array($extension, $video_ext_piclens)))
    625                         {
    626                                 if ($obj->my_config['piclens_video'])   // activation des videos
    627                                 {
    628                                         switch ($extension)
    629                                         {
    630                                                 case "flv":
    631                                                         echo "<media:content type=\"video/x-flv\" url=\"".$content_url."\"/>\n";
    632                                                         break;
    633                                         }
    634                                 }
    635                                 else
    636                                 {
    637                                         echo "<media:content url=\"" . $thumbnail_url . "\" />\n";
    638                                 }
    639                         }
     629            if ((in_array($extension, array_merge($video_ext_piclens,$videos_ext_other) )))
     630            {
     631                if ($obj->my_config['piclens_video']) // activation des videos
     632                {
     633                    if ((in_array($extension, $video_ext_piclens)))
     634                    {
     635                        //video supported by cooliris
     636                        echo "<media:content type=\"video/x-flv\" url=\"".$content_url."\"/>\n";
     637                    }
     638                    else
     639                    {
     640                        //video not supported by cooliris: thumbnail is displayed
     641                        echo "<media:content url=\"" . $thumbnail_url . "\" />\n";
     642                    }
     643                }
     644                else // deactivation of videos
     645                {
     646                  echo "<media:content url=\"" . $thumbnail_url . "\" />\n";
     647                }
     648            }
    640649                        // Fichiers video  (PY Gvideo)
    641650                        elseif ((in_array($extension, $py_addext)))
Note: See TracChangeset for help on using the changeset viewer.