Skip to content

Instantly share code, notes, and snippets.

@Fil
Created April 18, 2015 19:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fil/69abd5d8650923b53561 to your computer and use it in GitHub Desktop.
Save Fil/69abd5d8650923b53561 to your computer and use it in GitHub Desktop.
logo d'article
<?php
# (trouver le pipeline qui va bien ou patcher public/interfaces.php)
$table_des_traitements['LOGO_ARTICLE'][]= 'traiter_logo_article(%s, $Pile[$SP][\'id_article\'])';
[(#REM)
....
]
#SET{image,#ENV*{logo_article}}
<BOUCLE_d(DOCUMENTS)
{si (#GET{image}|non)}
{id_article}
{extension IN jpg, gif, png}
{0,1}
>
#SET{image,#LOGO_DOCUMENT}
</BOUCLE_d>
[(#GET{image}
|image_passe_partout{100,100}
|image_recadre{100,100,center}
)]
<?php
function traiter_logo_article($logo_article, $id_article) {
return trim(recuperer_fond('logo_article', array('logo_article' => $logo_article, 'id_article' => $id_article)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment