blog->use_smilies) {
return $this->blog->addSmilies($this->f('post_content'));
} else {
return $this->f('post_content');
}
}
function getChapo()
{
if ($this->blog->use_smilies) {
return $this->blog->addSmilies($this->f('post_chapo'));
} else {
return $this->f('post_chapo');
}
}
function openComment()
{
return (
dc_allow_comments && $this->f('post_open_comment') &&
(dc_comments_ttl == 0 ||
time()-(dc_comments_ttl*86400) < $this->getTS())
);
}
function openTb()
{
return (
dc_allow_trackbacks && $this->f('post_open_tb') &&
(dc_comments_ttl == 0 ||
time()-(dc_comments_ttl*86400) < $this->getTS())
);
}
# Liens vers tous les billets pour l'en tête
function getHeadLinks()
{
$res = '';
$index = $this->int_index;
$this->moveStart();
while (!$this->EOF())
{
$res .= 'f('post_titre').'" />'."\n";
$this->moveNext();
}
$this->move($index);
return $res;
}
function nbComments($zero,$one,$more)
{
$nb = $this->f('nb_comment');
if($nb == 0) {
return $zero;
} elseif($nb == 1) {
return $one;
} elseif($nb > 1) {
return sprintf($more,$nb);
}
}
function firstPostOfDay()
{
$prev_dt = NULL;
if($this->movePrev()) {
$prev_dt = $this->getLDate();
$this->moveNext();
}
if($prev_dt == NULL || $prev_dt != $this->getLDate()) {
return true;
} else {
return false;
}
}
function getRSSSeq()
{
return ' '."\n";
}
function getRSSItem($short=false)
{
if ($this->f('post_chapo') != '') {
$desc = strip_tags($this->f('post_chapo'));
} else {
$desc = util::cutString(strip_tags($this->f('post_content')),300).'...';
}
if ($short) {
$content = $desc;
} else {
$content = $this->f('post_chapo').' '.$this->f('post_content');
}
return
'- '."\n".
' '.$this->blog->toXML($this->f('post_titre'))."\n".
' '.$this->getPermURL()."\n".
' '.$this->getIsoDate()."\n".
(($this->f('post_lang')) ? ' '.$this->f('post_lang')."\n" : '').
' '.htmlspecialchars($this->getUserCN())."\n".
' '.htmlspecialchars($this->f('cat_libelle'))."\n".
' '.$this->blog->toXML($desc)."\n".
' \n".
'
'."\n";
}
function getAtomEntry($short=false)
{
if ($this->f('post_chapo') != '') {
$desc = strip_tags($this->f('post_chapo'));
} else {
$desc = util::cutString(strip_tags($this->f('post_content')),300).'...';
}
if ($short) {
$content = $desc;
} else {
$content = $this->f('post_chapo').' '.$this->f('post_content');
}
return
'f('post_lang')) ? ' xml:lang="'.$this->f('post_lang').'"' : '').
'>'."\n".
' '.$this->blog->toXML($this->f('post_titre'))."\n".
' '."\n".
' '.$this->getIsoDate()."\n".
' '.$this->getIsoDate()."\n".
' '.$this->getPermURL()."\n".
' '.htmlspecialchars($this->getUserCN())."\n".
' '.htmlspecialchars($this->f('cat_libelle'))."\n".
' '.$this->blog->toXML($desc)."\n".
' '.htmlspecialchars($content)."\n".
''."\n";
}
}
?>