/trunk/metier/api_0.1/Images.php |
---|
105,6 → 105,20 |
return $this->formaterResultatImages($images); |
} |
public function getInfosImagesParFicheEtSentier($tagFiche, $sentier) { |
$tpl = Config::get('smartFloreIllustrationsParSentier'); |
$url = $this->formaterUrl($tpl, array('tagFiche' => $tagFiche, 'sentier' => $sentier)); |
$donnees = $this->chargerDonnees($url); |
return $donnees['illustrations'] ?? false; |
} |
public function getInfosImageParId($imageId) { |
$tpl = Config::get('baseUrlServicesCelTpl'); |
$urlTpl = sprintf($tpl, 'CelImage').'/image/imgId=%d'; |
$url = sprintf($urlTpl, $imageId); |
return $this->chargerDonnees($url); |
} |
public function getInfosImagesTaxons() { |
$pas = 800; |
$idsTaxons = explode(',', $this->nntaxon); |
/trunk/configurations/config.defaut.ini |
---|
228,6 → 228,7 |
texteFormateSectionWikiTpl = "{ref:texteFormateWikiTpl}&txt.section.titre={sectionTitre}" |
smartFloreWikiTpl = "http://www.tela-botanica.org/wikini/eFloreRedactionTest/api/rest/0.5/pages/SmartFlore" |
smartFloreIllustrationsParSentier = http://www.tela-botanica.org/smart-form/services/Sentiers.php/sentier-illustration-fiche/?sentierTitre={sentier}&ficheTag={tagFiche} |
wikipediaLienPageTpl = "http://{langue}.wikipedia.org/wiki/{id}" |
/trunk/modules/fiche/squelettes/fiche_accueil.tpl.html |
---|
4,7 → 4,7 |
</aside> |
<div class="layout-contenu"> |
<script type="text/Javascript"> |
<script type="text/javascript"> |
var ongletsDefaut = [<?= $blocs; ?>]; |
</script> |
<div id="bloc-fiche" class="importance1"> |
/trunk/modules/mobile/sources/Illustrations.php |
---|
40,6 → 40,10 |
if (!empty($dessin)) { |
array_push($this->donnees, $dessin); |
} |
$images = $this->addSmartFloreImages(); |
if (!empty($images)) { |
$this->donnees = $images + $this->donnees; |
} |
return $this->donnees; |
} |
111,5 → 115,29 |
return $img; |
} |
public function addSmartFloreImages() { |
$img = []; |
$tagFiche = strtoupper($this->conteneur->getParametre('referentiel'))."nt" |
.$this->conteneur->getNomCourant()->getNomSelectionne()->get('num_taxonomique') |
; |
$sentier = $this->conteneur->getParametre('referentiel'); |
if ($sentier && $tagFiche) { |
$images = $this->images->getInfosImagesParFicheEtSentier($tagFiche, $sentier); |
if ($images) { |
foreach ($images as $image) { |
$retour = $this->images->getInfosImageParId($image['id']); |
$auteur = $retour['pseudo_utilisateur'] ?? 'Auteur inconnu'; |
$img[$image['id']]['src'] = $image['url']; |
$img[$image['id']]['legende']['titre'] = $auteur . ' le '.$this->formaterDateImg($image['date_creation']); |
$img[$image['id']]['legende']['texte'] = " "; |
} |
?> |
} |
} |
return $img; |
} |
} |
?> |