From a7feeb576f491f285cb76cba0b99e01e7a3ae390 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 10 Jan 2009 00:34:23 +0000 Subject: Big set of changes to comments, with related changes to akismet and user modules. * Don't delete vars when we delete a module. This makes reinstalling a module a lot easier. * Add user::lookup() as the preferred way to load a user, so that other modules don't delve into the user module (that'd be a problem when we swap out user modules) * Notify site admins if Akismet is not fully configured * Bundle all server variables into the comment so that if/when we re-check the comment, we are not using the server info from the site admin's request. * Update Akismet to grab request context data from the comment * Pre-seed comment fields if we have a logged in user. Update comment::create() API to clarify it for this. * Delete comment::update(), that's a controller function. * Add url to User_Model * Add author_name() author_email() and author_url() to Comment_Model. It'll return the appropriate values depending on whether the comment was left by a logged in user or a guest. * Use resetForm() instead of clearForm() when we reload the comment form after ajax submit, this way we preserve the pre-seeded values. * In the user profile page, ignore blank passwords. --- modules/comment/views/admin_comments.html.php | 22 ++++++++++++---------- modules/comment/views/comment.html.php | 8 +++++--- modules/comment/views/comments.html.php | 10 ++++++---- 3 files changed, 23 insertions(+), 17 deletions(-) (limited to 'modules/comment/views') diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index d2c17f71..311a27c9 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -30,11 +30,13 @@
+ 0): ?>

"Gallery has caught {{count}} spam for you since you installed spam filtering.", "other" => "Gallery has caught {{count}} spam for you since you installed spam filtering."), array("count" => $spam_caught)) ?>

+

count()): ?> "There is currently one comment in your spam queue. You can delete it with a single click, but there is no undo operation so you may want to check the message first to make sure that it really is spam.", @@ -51,7 +53,7 @@

- +
- +
@@ -90,9 +92,9 @@ " - alt="author ?>"/>
- author ?> + alt="author_name() ?>"/>
+ author_name() ?>
text ?> @@ -109,7 +111,7 @@ - + state != "published"): ?>
  • @@ -117,7 +119,7 @@
  • - + state != "spam"): ?>
  • @@ -125,7 +127,7 @@
  • - +
  • @@ -157,8 +159,8 @@
  • - - + +
    diff --git a/modules/comment/views/comment.html.php b/modules/comment/views/comment.html.php index fc53fefa..59b00b73 100644 --- a/modules/comment/views/comment.html.php +++ b/modules/comment/views/comment.html.php @@ -1,10 +1,12 @@
  • - " - class="gAvatar" alt="author ?>" /> + + " + class="gAvatar" alt="author_name() ?>" /> + created) ?> - author ?> + author_name() ?>

    text ?> diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php index 6c319317..7f82241e 100644 --- a/modules/comment/views/comments.html.php +++ b/modules/comment/views/comments.html.php @@ -2,11 +2,13 @@