X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=app%2Fout%2Fdefault%2Fviews%2Fsources%2Flogo_groupe.php;h=3dec41f6c2c5bf2111a5b2f9684d6b6f8baae1cf;hb=refs%2Ftags%2Fsourceml.1.3.0;hp=769c30307ca367dfc29c383759b4275e7fd2fcf7;hpb=2802d2dbcb5a1ea3c269d6fb4df9fbfb0f13f93d;p=mw_sourceml diff --git a/app/out/default/views/sources/logo_groupe.php b/app/out/default/views/sources/logo_groupe.php index 769c303..3dec41f 100644 --- a/app/out/default/views/sources/logo_groupe.php +++ b/app/out/default/views/sources/logo_groupe.php @@ -22,23 +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) : ?> +
- - + + \ No newline at end of file