getHeaderValue('x-org-id')) {
return $address . ' ';
} elseif ($id = Banana::$message->getHeaderValue('x-org-mail')) {
list($id, $domain) = explode('@', $id);
return $address . ' ';
} else {
return $address;
}
}
if (!empty($text)) {
$text .= ', ';
}
$text .= $address;
}
return $text;
case 'subject':
$link = null;
$text = stripslashes($_text);
if (preg_match('/^(.+?)\s*\[=> (.*?)\]\s*$/u', $text, $matches)) {
$text = $matches[1];
$group = $matches[2];
if (Banana::$group == $group) {
$link = ' [=> ' . $group . ']';
} else {
$link = ' [=> ' . Banana::$page->makeLink(array('group' => $group, 'text' => $group)) . ']';
}
}
$text = banana_catchFormats(banana_htmlentities($text));
if ($in_spool) {
return array($text, $link);
}
return $text . $link;
}
return null;
}
function hook_platalMessageLink($params)
{
$base = '';
if (isset($params['first'])) {
return $base . '/from/' . $params['first'];
}
if (isset($params['artid'])) {
if (@$params['part'] == 'xface') {
$base .= '/xface';
} elseif (@$params['action'] == 'new') {
$base .= '/reply';
} elseif (@$params['action'] == 'cancel') {
$base .= '/cancel';
} else {
$base .= '/read';
}
if (isset($params['part']) && $params['part'] != 'xface') {
return $base . '/' . $params['artid'] . '?part=' . urlencode($params['part']);
} else {
return $base . '/' . $params['artid'];
}
}
if (@$params['action'] == 'new') {
return $base . '/new';
}
return $base;
}
function hook_makeImg($img, $alt, $height, $width)
{
$url = 'images/banana/' . $img;
if (!is_null($width)) {
$width = ' width="' . $width . '"';
}
if (!is_null($height)) {
$height = ' height="' . $height . '"';
}
return '';
}
?>