Enhancements in ecm module

This commit is contained in:
Laurent Destailleur
2008-09-02 00:27:05 +00:00
parent 985af1d060
commit 25d6387eae
5 changed files with 140 additions and 60 deletions

View File

@@ -811,7 +811,7 @@ function img_object($alt, $object)
\brief Affiche picto (fonction g<>n<EFBFBD>rique)
\param alt Texte sur le alt de l'image
\param picto Nom de l'image a afficher (Si pas d'extension, on met '.png')
\param options Attribut suppl<EFBFBD>mentaire a la balise img
\param options Attribut supplementaire a la balise img
\param pictoisfullpath If 1, image path is a full path
\return string Retourne tag img
*/
@@ -823,6 +823,22 @@ function img_picto($alt, $picto, $options='', $pictoisfullpath=0)
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/'.$picto.'" border="0" alt="'.$alt.'" title="'.$alt.'"'.($options?' '.$options:'').'>';
}
/**
\brief Affiche picto (fonction g<>n<EFBFBD>rique)
\param alt Texte sur le alt de l'image
\param picto Nom de l'image a afficher (Si pas d'extension, on met '.png')
\param options Attribut supplementaire a la balise img
\param pictoisfullpath If 1, image path is a full path
\return string Retourne tag img
*/
function img_picto_common($alt, $picto, $options='', $pictoisfullpath=0)
{
global $conf;
if (! eregi('(\.png|\.gif)$',$picto)) $picto.='.png';
if ($pictoisfullpath) return '<img src="'.$picto.'" border="0" alt="'.$alt.'" title="'.$alt.'"'.($options?' '.$options:'').'>';
return '<img src="'.DOL_URL_ROOT.'/theme/common/'.$picto.'" border="0" alt="'.$alt.'" title="'.$alt.'"'.($options?' '.$options:'').'>';
}
/**
\brief Affiche logo action
\param alt Texte sur le alt de l'image