Ignore:
Timestamp:
Aug 9, 2012, 2:12:07 PM (12 years ago)
Author:
mistic100
Message:

compatibility with Embedded Videos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/lightbox/get_content.php

    r3609 r17487  
    11<?php
     2// Embedded Videos
    23
    34define('PHPWG_ROOT_PATH','../../');
     
    910if (!isset($_GET['imgid']) or !is_numeric($_GET['imgid']))
    1011{
    11   die;
     12  exit;
     13}
     14
     15if (empty($pwg_loaded_plugins['gvideo']) or !function_exists('gvideo_element_content'))
     16{
     17  exit;
    1218}
    1319
     
    1622$query = '
    1723SELECT *
    18   FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id=image_id
     24  FROM '.IMAGES_TABLE.'
     25    INNER JOIN '.IMAGE_CATEGORY_TABLE.'
     26    ON id=image_id
    1927  WHERE id='.$image_id
    2028        . get_sql_condition_FandF(
     
    2432  LIMIT 1';
    2533
    26 $picture['current'] = mysql_fetch_assoc( pwg_query($query) );
     34$picture = mysql_fetch_assoc( pwg_query($query) );
    2735
    28 if (empty($picture['current']))
     36if (empty($picture) or !$picture['is_gvideo'])
    2937{
    30   die;
     38  exit;
    3139}
    3240
    33 // PY Gvideo
    34 if (!empty($py_addext) and in_array(get_extension($picture['current']['path']), $py_addext))
    35 {
    36   $extension = strtolower(get_extension($picture['current']['path']));
    37   $picture['current']['path'] = get_element_url($picture['current']);
    38   include(GVIDEO_PATH.'gvideo.php');
    39   echo $content; 
    40 }
     41echo gvideo_element_content(null, $picture);
    4142
    4243?>
Note: See TracChangeset for help on using the changeset viewer.