From b9b015ff19edf564966c5dd6adedaab5ef514375 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 9 Apr 2007 13:41:10 +0000 Subject: - Patch #130366 by webchick and Steven: make signatures pretty. --- modules/user/user.module | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'modules/user/user.module') diff --git a/modules/user/user.module b/modules/user/user.module index 4e0c134ea..4ddedd140 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -2805,3 +2805,35 @@ function user_forms() { return $forms; } +/** + * Implementation of hook_comments(). + */ +function user_comment($comment, $op) { + // Validate signature. + if ($op == 'view') { + if (!empty($comment->signature)) { + $comment->signature = check_markup($comment->signature, $comment->format); + } + else { + $comment->signature = ''; + } + } +} + +/** + * Theme output of user signature. + * + * @ingroup themeable + */ +function theme_user_signature($signature) { + $output = ''; + if ($signature) { + $output .= '
'; + $output .= '
'. '—' .'
'; + $output .= $signature; + $output .= '
'; + } + + return $output; +} + -- cgit v1.2.3