Skip to content

Commit

Permalink
https://github.com/WWBN/AVideo/issues/9176#issuecomment-2205786239
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Jul 3, 2024
1 parent c680363 commit fa1d12e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
11 changes: 0 additions & 11 deletions objects/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1603,17 +1603,6 @@ function getTagIfExists($relativePath)
}
}

function getVideoImagewithHoverAnimation($relativePath, $relativePathHoverAnimation = '', $title = '', $preloadImage = false, $doNotUseAnimatedGif = false)
{
$id = uniqid();
//getImageTagIfExists($relativePath, $title = '', $id = '', $style = '', $class = 'img img-responsive', $lazyLoad = false, $preloadImage=false)
$img = getImageTagIfExists($relativePath, $title, "thumbsJPG{$id}", '', 'thumbsJPG img img-responsive', false, $preloadImage) . PHP_EOL;
if (empty($doNotUseAnimatedGif) && !empty($relativePathHoverAnimation) && empty($_REQUEST['noImgGif'])) {
$img .= getImageTagIfExists($relativePathHoverAnimation, $title, "thumbsGIF{$id}", 'position: absolute; top: 0;', 'thumbsGIF img img-responsive ', $preloadImage) . PHP_EOL;
}
return '<div class="thumbsImage">' . $img . '</div>';
}

function getRelativePath($path)
{
global $global;
Expand Down
12 changes: 12 additions & 0 deletions objects/functionsImages.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,18 @@ function convertImageIfNotExists($source, $destination, $width, $height, $scaleU
return $destination;
}

function getVideoImagewithHoverAnimation($relativePath, $relativePathHoverAnimation = '', $title = '', $preloadImage = false, $doNotUseAnimatedGif = false)
{
$id = uniqid();
//getImageTagIfExists($relativePath, $title = '', $id = '', $style = '', $class = 'img img-responsive', $lazyLoad = false, $preloadImage=false)
$img = getImageTagIfExists($relativePath, $title, "thumbsJPG{$id}", '', 'thumbsJPG img img-responsive', false, $preloadImage) . PHP_EOL;
if (empty($doNotUseAnimatedGif) && !empty($relativePathHoverAnimation) && empty($_REQUEST['noImgGif'])) {
$img .= getImageTagIfExists($relativePathHoverAnimation, $title, "thumbsGIF{$id}", 'position: absolute; top: 0;', 'thumbsGIF img img-responsive ', true, $preloadImage) . PHP_EOL;
}
return '<div class="thumbsImage">' . $img . '</div>';
}


function getImageTagIfExists($relativePath, $title = '', $id = '', $style = '', $class = 'img img-responsive', $lazyLoad = false, $preloadImage = false)
{
global $global;
Expand Down

0 comments on commit fa1d12e

Please sign in to comment.