comparison includes/class.post.php @ 30:fa43c43763a2

Attribution correcte des urls des commentaires, petit refactoring des posts On a maintenant une fonction séparée sur les posts permettant d'obtenir les différentes informations sur les posts, ce qui peut s'avérer utile si on veut les ré-utiliser par exemple sur les différents commentaires.
author Franck Deroche <webmaster@defr.org>
date Mon, 05 Nov 2007 08:46:49 +0100
parents ff57b45eda37
children 4cea8b128fdd
comparison
equal deleted inserted replaced
29:750613da68ec 30:fa43c43763a2
65 $this->tags = 'aucun'; 65 $this->tags = 'aucun';
66 } 66 }
67 } 67 }
68 68
69 public function format() { 69 public function format() {
70 $this->tpl->setParams($this->getTplParams());
71 return $this->tpl;
72 }
73
74 public function getTplParams() {
70 $params = array( 75 $params = array(
71 '#post@class' => 'PostContent ' . $this->infos->Emot, 76 '#post@class' => 'PostContent ' . $this->infos->Emot,
72 'postTitle' => $this->infos->Titre, 77 'postTitle' => $this->infos->Titre,
73 'postDate' => $this->dateFormatee, 78 'postDate' => $this->dateFormatee,
74 'postContent' => $this->mess, 79 'postContent' => $this->mess,
81 if(!empty($this->mood->src)) { 86 if(!empty($this->mood->src)) {
82 $params['#mood@src'] = $this->mood->src; 87 $params['#mood@src'] = $this->mood->src;
83 $params['#mood@alt'] = $this->mood->alt; 88 $params['#mood@alt'] = $this->mood->alt;
84 $params['#mood@class'] = 'mood'; 89 $params['#mood@class'] = 'mood';
85 } 90 }
86 $this->tpl->setParams($params); 91 return $params;
87 return $this->tpl; 92 }
93
94 public function getURL() {
95 return $this->url;
88 } 96 }
89 } 97 }
90 ?> 98 ?>