X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=banana%2Fspool.inc.php;h=e9e81f8e6f4fa0b7a1ea13541412a26665655751;hb=3204d440aa99a5c441d0179181b4f60d33d5a372;hp=d8171fe867bd300c71a03c1762cba419f45861b8;hpb=02198aceaeb7fee2c759ecf9896ed3b2f69f9ac4;p=banana.git diff --git a/banana/spool.inc.php b/banana/spool.inc.php index d8171fe..e9e81f8 100644 --- a/banana/spool.inc.php +++ b/banana/spool.inc.php @@ -309,6 +309,10 @@ class BananaSpool * @param $_pfx_node STRING prefix used for current node * @param $_pfx_end STRING prefix used for children of current node * @param $_head BOOLEAN true if first post in thread + * + * If you want to analyse subject, you can define the function hook_getSubject(&$subject) which + * take the subject as a reference parameter, transform this subject to be displaid in the spool + * view and return a string. This string will be put after the subject. */ function _to_html($_id, $_index, $_first=0, $_last=0, $_ref="", $_pfx_node="", $_pfx_end="", $_head=true) @@ -342,13 +346,19 @@ class BananaSpool if (strlen($subject) == 0) { $subject = _b_('(pas de sujet)'); } + $link = null; + if (function_exists('hook_getSubject')) { + $link = hook_getSubject($subject); + } + $subject = htmlentities($subject); if ($_index == $_ref) { - $res .= ''.htmlentities($subject).''; + $res .= '' . $subject . $link . ''; } else { $res .= makeHREF(Array('group' => $this->group, 'artid' => $_id), - htmlentities($subject), - htmlentities($subject)); + $subject, + $subject) + . $link; } $res .= "\n".formatFrom($this->overview[$_id]->from)."\n";