case 'references': return _b_('Références');
case 'x-face': return _b_('Image');
default:
- if (function_exists('hook_header_translate')) {
- return hook_header_translate($hdr);
+ if (function_exists('hook_headerTranslate')
+ && $res = hook_headerTranslate($hdr)) {
+ return $res;
}
return $hdr;
}
$res = "";
$groups = preg_split("/[\t ]*,[\t ]*/",$_text);
foreach ($groups as $g) {
- $res.="<a href='thread.php?group=$g'>$g</a>, ";
+ $res.="<a href='?group=$g'>$g</a>, ";
}
return substr($res,0, -2);
$p = $banana->spool->overview[$p]->parent;
}
foreach (array_reverse($par_ok) as $p) {
- $rsl .= "<a href=\"article.php?group={$banana->spool->group}&id=$p\">$ndx</a> ";
+ $rsl .= "<a href=\"?group={$banana->spool->group}&artid=$p\">$ndx</a> ";
$ndx++;
}
return $rsl;
return '<img src="xface.php?face='.base64_encode($_text).'" alt="x-face" />';
default:
- if (function_exists('hook_formatDisplayHeader')) {
- return hook_formatDisplayHeader($_header, $_text);
+ if (function_exists('hook_formatDisplayHeader')
+ && $res = hook_formatDisplayHeader($_header, $_text))
+ {
+ return $res;
}
return htmlentities($_text);
}
} elseif ($today == 1 + $dday) {
$format = _b_('hier')." %H:%M";
} elseif ($today < 7 + $dday) {
- $format = '%A %H:%M';
+ $format = '%a %H:%M';
} else {
$format = '%a %e %b';
}
return preg_replace("/\\\(\(|\))/","\\1",$result);
}
+function displayshortcuts($first = -1) {
+ global $banana;
+ extract($banana->state);
+
+ $res = '<div class="banana_scuts">';
+ $res .= '[<a href="?">'._b_('Liste des forums').'</a>] ';
+ if (is_null($group)) {
+ return $res.'</div>';
+ }
+
+ $res .= "[<a href=\"?group=$group\">$group</a>] ";
+
+ if (is_null($artid)) {
+ $res .= "[<a href=\"?group=$group&action=new\">"._b_('Nouveau message')."</a>] ";
+ if (sizeof($banana->spool->overview)>$banana->tmax) {
+ $res .= '<br />';
+ $n = intval(log(count($banana->spool->overview), 10))+1;
+ for ($ndx=1; $ndx <= sizeof($banana->spool->overview); $ndx += $banana->tmax) {
+ if ($first==$ndx) {
+ $fmt = "[%0{$n}u-%0{$n}u] ";
+ } else {
+ $fmt = "[<a href=\"?group=$group&first=$ndx\">%0{$n}u-%0{$n}u</a>] ";
+ }
+ $res .= sprintf($fmt, $ndx, min($ndx+$banana->tmax-1,sizeof($banana->spool->overview)));
+ }
+ }
+ } else {
+ $res .= "[<a href=\"?group=$group&artid=$artid&action=new\">"
+ ._b_('Répondre')."</a>] ";
+ if ($banana->post->checkcancel()) {
+ $res .= "[<a href=\"?group=$group&artid=$artid&action=cancel\">"
+ ._b_('Annuler ce message')."</a>] ";
+ }
+ }
+ return $res.'</div>';
+}
+
+/********************************************************************************
+ * FORMATTING STUFF : BODY
+ */
+
function wrap($text, $_prefix="")
{
$parts = preg_split("/\n-- ?\n/", $text);