|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
kdz Smarty Rookie
Joined: 24 Mar 2007 Posts: 5
|
Posted: Sat Mar 24, 2007 2:11 pm Post subject: Help, une classe me pose problème (register_object) |
|
|
Salut,
J'arrive bien à utiliser des objets dans mes templates mais une classe, faite d'une telle manière me donne mal à la tête...
plutot qu'un long discourt, voici la petite classe permettant d'afficher l'icone d'un fichier selon son extension... bref, voici le code :
http://www.phpclasses.org/browse/package/2640.html
Dans mon code php j'ai ça :
$iconeFichier = new FileIcon();
$smarty->register_object('iconeFichier',$iconeFichier);
Mais évidemment quoique je fasse côté template ça ne passe pas puisque il aurait fallu faire :
$iconeFichier = new FileIcon('MON-FICHIER');
Y'a t'il une solution ?
Last edited by kdz on Sat Mar 24, 2007 2:12 pm; edited 1 time in total |
|
Back to top |
|
kdz Smarty Rookie
Joined: 24 Mar 2007 Posts: 5
|
Posted: Sun Mar 25, 2007 10:47 pm Post subject: |
|
|
Personne ? |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|