classes/BannerImage.php
public function getCheckBannerImageFallback($BannerImage, $intWidth, $intHeight)
	{
		$fallback_content = false;
		$path_parts = pathinfo($BannerImage);
		if     ( is_file(TL_ROOT . '/' . $path_parts['dirname'] . '/' . $path_parts['filename'].'.jpg') )
		{
			$fallback_ext     = '.jpg';
        	$fallback_content = true;
		}
		elseif ( is_file(TL_ROOT . '/' . $path_parts['dirname'] . '/' . $path_parts['filename'].'.png') )
		{
			$fallback_ext     = '.png';
			$fallback_content = true;
		}
		elseif ( is_file(TL_ROOT . '/' . $path_parts['dirname'] . '/' . $path_parts['filename'].'.gif') )
		{
		    $fallback_ext     = '.gif';
		    $fallback_content = true;
		}
		
		//if fallback image found, get image with size of flash size
		if ($fallback_content === true)
		{
		    //Get Image with sizes of flash
		    $src_fallback = \Image::get($this->urlEncode($path_parts['dirname'].'/'.$path_parts['filename'].$fallback_ext), $intWidth, $intHeight,'proportional');
		    return $src_fallback;
		}

		//no fallback image found
		return false;
	}
public function getCheckBannerImageFallback($BannerImage, $intWidth, $intHeight)
	{
		$fallback_content = false;
		$path_parts = pathinfo($BannerImage);
		if     ( is_file(TL_ROOT . '/' . $path_parts['dirname'] . '/' . $path_parts['filename'].'.jpg') )
		{
			$fallback_ext     = '.jpg';
        	$fallback_content = true;
		}
		elseif ( is_file(TL_ROOT . '/' . $path_parts['dirname'] . '/' . $path_parts['filename'].'.png') )
		{
			$fallback_ext     = '.png';
			$fallback_content = true;
		}
		elseif ( is_file(TL_ROOT . '/' . $path_parts['dirname'] . '/' . $path_parts['filename'].'.gif') )
		{
		    $fallback_ext     = '.gif';
		    $fallback_content = true;
		}
		
		//if fallback image found, get image with size of flash size
		if ($fallback_content === true)
		{
		    //Get Image with sizes of flash
		    $src_fallback = \Image::get($this->urlEncode($path_parts['dirname'].'/'.$path_parts['filename'].$fallback_ext), $intWidth, $intHeight,'proportional');
		    return $src_fallback;
		}

		//no fallback image found
		return false;
	}
public function getCheckBannerImageFallback ( $ BannerImage , $ intWidth , $ intHeight ) { $ fallback_content = false ; $ path_parts = pathinfo ( $ BannerImage ) ; if ( is_file ( TL_ROOT . '/' . $ path_parts [ 'dirname' ] . '/' . $ path_parts [ 'filename' ] . '.jpg' ) ) { $ fallback_ext = '.jpg' ; $ fallback_content = true ; } elseif ( is_file ( TL_ROOT . '/' . $ path_parts [ 'dirname' ] . '/' . $ path_parts [ 'filename' ] . '.png' ) ) { $ fallback_ext = '.png' ; $ fallback_content = true ; } elseif ( is_file ( TL_ROOT . '/' . $ path_parts [ 'dirname' ] . '/' . $ path_parts [ 'filename' ] . '.gif' ) ) { $ fallback_ext = '.gif' ; $ fallback_content = true ; } //if fallback image found, get image with size of flash size if ( $ fallback_content === true ) { //Get Image with sizes of flash $ src_fallback = \ Image :: get ( $ this -> urlEncode ( $ path_parts [ 'dirname' ] . '/' . $ path_parts [ 'filename' ] . $ fallback_ext ) , $ intWidth , $ intHeight , 'proportional' ) ; return $ src_fallback ; } //no fallback image found return false ; }
Search and get a flash fallback image path if exists

@param string	$BannerImage	Image path (flash file)
@param int		$maxWidth		Flash file width
@param int		$maxHeight		Flash file height
@return	mixed	$string/false	Fallback image path / false
Search and get a flash fallback image path if exists