This commit is contained in:
Savetheinternet 2011-04-12 18:02:20 +10:00
parent d6d017e368
commit 9dc1e98704
4 changed files with 98 additions and 1 deletions

View file

@ -92,6 +92,24 @@
)));
}
function pm_snippet($body) {
global $config;
// Replace line breaks with some whitespace
$body = str_replace('<br/>', ' ', $body);
// Strip tags
$body = strip_tags($body);
// Unescape HTML characters, to avoid splitting them in half
$body = html_entity_decode_utf8($body);
$body = substr($body, 0, $config['mod']['snippet_length']) . (strlen($body) > $config['mod']['snippet_length'] ? '…' : '');
// Re-escape the characters.
return '<em>' . utf8tohtml($body) . '</em>';
}
function confirmLink($text, $title, $confirm, $href) {
global $config, $mod;
if($config['mod']['server-side_confirm'])