forked from leftypol/leftypol
PM inbox
This commit is contained in:
parent
d6d017e368
commit
9dc1e98704
4 changed files with 98 additions and 1 deletions
|
@ -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'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue