X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=app%2Fout%2Fdefault%2Fviews%2Fsources%2Flogo_groupe.php;h=3dec41f6c2c5bf2111a5b2f9684d6b6f8baae1cf;hb=HEAD;hp=c46eeb5f9adf1807d77776afa14152587f9889c9;hpb=387ff601aec85b26e0be3d57d0a4eccd2ff9ed25;p=mw_sourceml diff --git a/app/out/default/views/sources/logo_groupe.php b/app/out/default/views/sources/logo_groupe.php index c46eeb5..3dec41f 100644 --- a/app/out/default/views/sources/logo_groupe.php +++ b/app/out/default/views/sources/logo_groupe.php @@ -22,24 +22,56 @@ if(isset($this->out["groupe"])) $groupes = array($this->out["groupe"]["id"] => $this->out["groupe"]); } foreach($groupes as $groupe) : - if( - isset($groupe["image_uri"]) - && $groupe["image_uri"] - && file_exists($groupe["image_uri"]) - && ($img_size = $data->img_size($groupe["image_uri"], 200, 130)) !== false - ) : - $margin_top = floor((150 - $img_size["height"]) / 2); + $source_image_url = false; + $source_thumb = false; + $margin_top = 0; + if( + isset($groupe["image_uri"]) + && $groupe["image_uri"] + && file_exists($groupe["image_uri"]) + ){ + $source_image_url = $groupe["image_uri"]; + if($data->mw_thumbs_activated()){ + $source_thumb = $data->img_thumb( + $source_image_url, + 200, + 130, + $this->path("content")."thumbs", + array(255, 255, 255) + ); + } + else{ + if($img_size = $data->img_size($source_image_url, 200, 130)){ + $margin_top = floor((130 - $img_size["height"]) / 2); + } + } + if($source_image_url && !$source_thumb && !$img_size) $source_image_url = false; + } + if($source_image_url) : ?> +
$groupe["id"])) ?>"> - " + + " + width="" + height="" + alt="" /> + + " width="" height="" style="margin-top:px" alt="" /> +
- - + + \ No newline at end of file