Changeset 8237


Ignore:
Timestamp:
Dec 22, 2010, 10:23:11 PM (14 years ago)
Author:
rvelices
Message:

gvideo fix issue with thumbnails

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/gvideo/main.inc.php

    r3697 r8237  
    3434
    3535
    36 function py_mimetype($path, $element_info)
     36function py_mimetype($location, $element_info)
    3737{
    38   global $py_addext;
    39        
    40   $extension = strtolower(get_extension($element_info['path']));
    41   if (empty($element_info['tn_ext']) and in_array($extension, $py_addext))
    42         {
    43     $path = GVIDEO_PATH . 'mimetypes/' . $extension . '.png';
    44         }
    45   return $path;
     38  if ( empty( $element_info['tn_ext'] ) )
     39  {
     40    global $py_addext;
     41    $extension = strtolower(get_extension($element_info['path']));
     42    if (in_array($extension, $py_addext))
     43    {
     44      $location= 'plugins/' . GVIDEO_DIR . '/mimetypes/' . $extension . '.png';
     45    }
     46  }
     47  return $location;
    4648}
    4749
     
    6062
    6163add_event_handler('render_element_content', 'gvideoadd');
    62 add_event_handler('get_thumbnail_url', 'py_mimetype', 60, 2);
     64add_event_handler('get_thumbnail_location', 'py_mimetype', 60, 2);
    6365
    6466?>
Note: See TracChangeset for help on using the changeset viewer.