//echo $video['url']; exit;
             //print_k($video);
             $media['videoStatus'] = 1;
             $media['videoInfo'] = $video;
         } else {
             $media['videoStatus'] = 0;
         }
     } else {
         $media['videoStatus'] = 0;
     }
 } else {
     /*
      * Get an estimated preview width and height
      */
     $sample = $mediaInfo2->getSampleInfoFromDB();
     $sampleSize = getScaledSizeNoSource($sample['sample_width'], $sample['sample_height'], $config['settings']['preview_size'], $crop = 0);
     $media['previewWidth'] = $sampleSize[0];
     $media['previewHeight'] = $sampleSize[1];
 }
 $mediaPrice = getMediaPrice($media);
 // Get the media price based on the license
 $mediaCredits = getMediaCredits($media);
 // Get the media credits based on the license
 // Get category ID - Make sure member has access to category - maybe add this later
 $galleryIDArrayFlat = $galleryIDArray ? implode(",", $galleryIDArray) : 0;
 /*
  * Prints *****************************************************************************************************************************
  */
 $galleryPrintsResult = mysqli_query($db, "\r\n\t\t\t\t\tSELECT DISTINCT(item_id) \r\n\t\t\t\t\tFROM {$dbinfo[pre]}item_galleries \r\n\t\t\t\t\tLEFT JOIN {$dbinfo[pre]}prints \r\n\t\t\t\t\tON {$dbinfo[pre]}item_galleries.item_id = {$dbinfo[pre]}prints.print_id\r\n\t\t\t\t\tWHERE {$dbinfo[pre]}item_galleries.gallery_id IN ({$galleryIDArrayFlat}) \r\n\t\t\t\t\tAND {$dbinfo[pre]}item_galleries.mgrarea = 'prints' \r\n\t\t\t\t\tAND ({$dbinfo[pre]}prints.attachment = 'media' OR {$dbinfo[pre]}prints.attachment = 'both')\r\n\t\t\t\t\t");
 // Find out which prints are assigned to galleries this photo is in
 $galleryPrintsRows = mysqli_num_rows($galleryPrintsResult);
Exemple #2
0
                //echo $video['url']; exit;
                //print_k($video);
                $media['videoStatus'] = 1;
                $media['videoInfo'] = $video;
            } else {
                $media['videoStatus'] = 0;
            }
        } else {
            $media['videoStatus'] = 0;
        }
    }
    if (!$thumb) {
        $thumb['thumb_width'] = $config['settings']['rollover_size'];
        $thumb['thumb_height'] = round($config['settings']['rollover_size'] * 0.75);
    }
    $crop = $config['settings']['rollovercrop'] ? $config['settings']['rollovercrop_height'] : 0;
    $sized = getScaledSizeNoSource($thumb['thumb_width'], $thumb['thumb_height'], $config['settings']['rollover_size'], $crop);
    // Figure out the width and height this item will be
    $media['width'] = $sized[0];
    $media['height'] = $sized[1];
    $smarty->assign('media', $media);
    // Assign to smarty
    $smarty->display('hover.tpl');
    // Smarty template
} catch (Exception $e) {
    die(exceptionError($e));
}
if ($db) {
    mysqli_close($db);
}
// Close any database connections