blog = $blog; } /** @function getFormat Renvoie le format du billet (''wiki'' ou ''html'') @return string */ function getFormat() { return ($this->f('post_content_wiki') != '') ? 'wiki' : 'html'; } /** @function getNbComments Renvoie le nombre de commentaires d'un billet. @return integer */ function getNbComments() { return (integer) $this->blog->getNbComments($this->f('post_id')); } /** @function getNbTrackbacks Renvoie le nombre de trackback d'un billet. @return integer */ function getNbTrackbacks() { return (integer) $this->blog->getNbTrackbacks($this->f('post_id')); } /** @function getTS Renvoie le timestamp UNIX du billet. @return string */ function getTS() { return strtotime($this->f('post_dt')); } /** @function getLDate() Renvoie la date du billet au format définit par la propriété ''date_format'' de l'objet $blog définit pour l'objet courant. @return string */ function getLDate() { return dt::str($this->blog->date_format,$this->getTS()); } /** @function getLTime() Renvoie l'heure du billet au format définit par la propriété ''time_format'' de l'objet $blog définit pour l'objet courant. @return string */ function getLTime() { return dt::str($this->blog->time_format,$this->getTS()); } /** @function getIsoDate Renvoie la date du billet au format ISO. @return string */ function getIsoDate() { return dt::iso8601($this->getTS()); } /** @function getUserCN Renvoie le ''common name'' de l'auteur du billet. Si ce dernier a un pseudo, alors le pseudo sera utilisé, sinon, le prénom suivit du nom. @return string */ function getUserCN() { if($this->f('user_pseudo') != '') { return $this->f('user_pseudo'); } else { return trim($this->f('user_prenom').' '.$this->f('user_nom')); } } /** @function getPermURL Renvoie l'URL permanente du billet. @return string */ function getPermURL() { return sprintf($this->blog->front_url['post'],$this->f('postyear'), $this->f('postmonth'),$this->f('postday'), $this->f('post_id'),$this->f('post_titre_url')); } /** @function getCatURL Renvoir l'URL vers la catégorie du billet. @return string */ function getCatURL() { return sprintf($this->blog->front_url['cat'],$this->f('cat_libelle_url')); } /** @function getIDs Cette méthode crée une liste des ID de chaque billet du recordset. Chaque entrée peut être précédée d'une éventuelle chaîne définie par $str. @param string str Chaîne précédant chaque ID @return array */ function getIDs($str='') { $res = array(); $index = $this->int_index; $this->moveStart(); while (!$this->EOF()) { $res[] = $str.$this->f('post_id'); $this->moveNext(); } $this->move($index); return $res; } } ?>