From 9d7dbbf351aa7983f0fe499a3f80b59ee2f68547 Mon Sep 17 00:00:00 2001 From: deva Date: Sun, 26 Oct 2008 16:06:16 +0000 Subject: Added signature support in profile and forum posts. --- forum/utils/posts.php | 2 +- forum/utils/profile.php | 3 +++ forum/utils/users.php | 10 +++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) (limited to 'forum/utils') diff --git a/forum/utils/posts.php b/forum/utils/posts.php index c301852..209d316 100644 --- a/forum/utils/posts.php +++ b/forum/utils/posts.php @@ -69,7 +69,7 @@ class Post { if(!$client_is_mobile_device) echo "Date: "; echo date("j. M Y - G:i", $this->date) . "\n"; echo $indent . "
\n"; - echo parse($this->message, $indent . " ") . "\n"; + echo parse($this->message . "\n------\n" . $user->signature, $indent . " ") . "\n"; echo $indent . "
\n"; echo $indent . "
\n"; diff --git a/forum/utils/profile.php b/forum/utils/profile.php index ee47cb0..7f8372c 100644 --- a/forum/utils/profile.php +++ b/forum/utils/profile.php @@ -6,6 +6,7 @@ if($action == "update") { $current_user->name = $name; $current_user->email = $email; $current_user->avatar = $avatar; + $current_user->signature = $signature; if($password != "") { if($password == $password_confirm) { $current_user->password = sha1(md5($password)); @@ -34,6 +35,8 @@ while($avatar = readdir($dir)) { } ?>
+Signature:
+

diff --git a/forum/utils/users.php b/forum/utils/users.php index 93cc23c..7f54eee 100644 --- a/forum/utils/users.php +++ b/forum/utils/users.php @@ -12,6 +12,7 @@ class User { public $avatar; public $email; public $notified; + public $signature; public function checkPassword($password) { @@ -28,11 +29,12 @@ class User { fwrite($fp, " password=\"" . $this->password . "\"\n"); fwrite($fp, " name=\"" . htmlspecialchars($this->name, ENT_QUOTES, "UTF-8") . "\"\n"); fwrite($fp, " avatar=\"" . htmlspecialchars($this->avatar, ENT_QUOTES, "UTF-8") . "\"\n"); - fwrite($fp, " email=\"" . htmlspecialchars($this->email, ENT_QUOTES, "UTF-8") . "\">\n"); - fwrite($fp, " \n"); + fwrite($fp, " email=\"" . htmlspecialchars($this->email, ENT_QUOTES, "UTF-8") . "\">"); + fwrite($fp, htmlspecialchars($this->signature, ENT_QUOTES, "UTF-8")); + fwrite($fp, "\n"); } - public function User($enabled, $uid, $gid, $username, $password, $name, $email, $avatar, $notified) + public function User($enabled, $uid, $gid, $username, $password, $name, $email, $avatar, $signature, $notified) { $this->enabled = $enabled; $this->gid = $gid; @@ -42,6 +44,7 @@ class User { $this->email = $email; $this->name = $name; $this->avatar = $avatar; + $this->signature = $signature; if($notified == "") $notified = 0; $this->notified = $notified; } @@ -119,6 +122,7 @@ class Users { $u->getAttribute('name'), $u->getAttribute('email'), $u->getAttribute('avatar'), + $u->textContent, $u->getAttribute('notified')); $this->add($user); -- cgit v1.2.3