Skip to content

Instantly share code, notes, and snippets.

@phenix-factory
Last active June 22, 2016 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phenix-factory/57cb993512d13fdfee88 to your computer and use it in GitHub Desktop.
Save phenix-factory/57cb993512d13fdfee88 to your computer and use it in GitHub Desktop.
SPIP: Retrouver le logo d'un objet sans avoir a lancer tout le système de boucle.
<?php
/**
* #CHERCHER_LOGO{objet, id_objet}
* Retrouver le logo d'un objet sans avoir à lancé tout le système de boucle.
*
* @param mixed $p
* @access public
* @return mixed
*/
function balise_CHERCHER_LOGO_dist($p) {
$objet = interprete_argument_balise(1, $p);
$id_objet = interprete_argument_balise(2, $p);
// Faire la conversion pour la fonction chercher_logo
$objet = "id_table_objet($objet)";
include_spip('inc/filtres');
include_spip('public/quete');
$p->code = "http_img_pack(_DIR_IMG.quete_logo($objet, 'on', $id_objet, '', true), '', 'class=\"spip_logos\"')";
$p->interdire_scripts = false;
return $p;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment