25,7 → 25,6 |
} |
|
public function initialiser() { |
|
} |
|
public function executerActionParDefaut() { |
81,10 → 80,10 |
|
foreach ($images as &$image) { |
|
$taille_image = array($image['ci_meta_height'],$image['ci_meta_width']); |
$taille_image = array($image['hauteur'],$image['largeur']); |
$image['taille'] = $this->calculerDimensionPourVignette($taille_image); |
|
$id = $image['coi_ce_image']; |
$id = $image['id_image']; |
|
$format_galerie = Config::get('format_image_galerie'); |
$format_zoom = Config::get('format_image_zoom'); |
91,6 → 90,8 |
|
$image['url_image_format_galerie'] = $this->getUrlImageBase($id, $format_galerie); |
$image['url_image_format_zoom'] = $this->getUrlImageBase($id, $format_zoom); |
|
$image['url_fiche_eflore'] = $this->getUrlFicheEfloreNumNom($image['nom_sel_nn']); |
} |
|
$donnees['pagination'] = $this->afficherBarrePagination($criteres); |
155,9 → 156,17 |
|
// +---------------------------------------------------------------------------------------------------------------+ |
// METHODES POUR L'AFFICHAGE DE DONNEES |
private function getUrlImageRedirigee($id, $format) { |
|
$id = sprintf('%09s', $id); |
|
$chemin_sur_serveur = Config::get('url_redirection_images'); |
return $chemin_sur_serveur.$id.$format; |
|
} |
|
private function getUrlImageBase($id, $format = 'L') { |
|
private function getVraieUrlImageBase($id, $format) { |
|
$id = sprintf('%09s', $id) ; |
$id = wordwrap($id, 3 , '_', true) ; |
|
174,8 → 183,20 |
|
return $fichier; |
} |
|
private function getUrlImageBase($id, $format = 'L') { |
|
$url = ''; |
|
if(Config::get('utilise_redirection_images')) { |
$url = $this->getUrlImageRedirigee($id, $format); |
} else { |
$url = $this->getVraieUrlImageBase($id, $format); |
} |
|
return $url; |
} |
|
// commentaire |
private function getTypeMime($format) { |
$mime = ''; |
switch ($format) { |