Created
September 13, 2021 14:11
-
-
Save iamrobert/39eb044f47a756d191ff062c58525a36 to your computer and use it in GitHub Desktop.
UCM FLEXIcontent IMAGE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php ob_start(); ?> | |
<?php | |
// captured from image field | |
if ( $mod_use_image && $item->image ): | |
if ( $item->image != "" ) { | |
$isotopePic = str_replace( "/s_", "/b_", $item->image ); | |
list( $lsource_w, $lsource_h ) = getimagesize( JURI::base() . $isotopePic ); | |
$imgDims = 'width="' . $lsource_w . '" height="' . $lsource_h . '" '; | |
} | |
?> | |
<img class="w100" src="<?php echo $isotopePic; ?>" <?php echo $imgDims;?> alt="<?php echo flexicontent_html::striptagsandcut($item->fulltitle); ?>" loading="lazy"> | |
<?php // imagemissing | |
elseif ( $mod_use_image && $item->image == "" ): ?> | |
<img class="w100" src="<?php echo $nopic; ?>" width="370" height="370" alt="<?php echo flexicontent_html::striptagsandcut($item->fulltitle); ?>" loading="lazy"> | |
<?php endif; ?> | |
<?php $captured_image = ob_get_clean(); $hasImage = (boolean) trim($captured_image); ?> | |
<div class="overflow-hidden"> | |
<?php echo $captured_image;?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment