summaryrefslogtreecommitdiff
path: root/modules/user/user.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-04-09 13:41:10 +0000
committerDries Buytaert <dries@buytaert.net>2007-04-09 13:41:10 +0000
commitb9b015ff19edf564966c5dd6adedaab5ef514375 (patch)
tree4d9819d8b2a8be62ddc8617764fc4c9a55d6af86 /modules/user/user.module
parent6f94dc3c2f57c9c724ce49a5a3a8e21a72ef3377 (diff)
downloadbrdo-b9b015ff19edf564966c5dd6adedaab5ef514375.tar.gz
brdo-b9b015ff19edf564966c5dd6adedaab5ef514375.tar.bz2
- Patch #130366 by webchick and Steven: make signatures pretty.
Diffstat (limited to 'modules/user/user.module')
-rw-r--r--modules/user/user.module32
1 files changed, 32 insertions, 0 deletions
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 .= '<div class="clear">';
+ $output .= '<div>'. '—' .'</div>';
+ $output .= $signature;
+ $output .= '</div>';
+ }
+
+ return $output;
+}
+