Jifty::Plugin::Comment::Notification::CommentNeedsModeration(3pm)

Jifty::Plugin::Comment::Notification::CommentNeedsModeration3pm

New comments made, but not published

Usage

To activate this notification, you must override the notification in your application.

  use strict;
  use warnings;
  package MyApp::Notification::CommentNeedsModeration;
  use base qw/ Jifty::Plugin::Comment::Notification::CommentNeedsModeration /;
  sub setup {
      my $self = shift;
      # Limit to users that have a "moderator" column set to 1
      my $users = MyApp::Model::UserCollection->new;
      $users->limit( column => 'moderator', value => 1 );
      $self->to_list(@{ $users->items_array_ref });
      $self->SUPER::setup(@_);
  }
  sub url {
      my $self = shift;
      return Jifty->config->framework('Web')->{'BaseURL'}
          . $self->parent->permalink
          . '#comment-'.$self->comment->id;
  }
  1;

Overview

This notificaiton (when properly configured) is sent out to any who need to know when a comment has been created, but not published because Net::Akismet has marked it as spam.

Methods

setup

This method sets up the notification. This method should be overridden to setup "to_list" in Jifty::Notification to select who will receive this message. See the "SYNOPSIS".

comment

This will contain the Jifty::Plugin::Comment::Model::Comment that has been published.

parent

This will contain the object that the comment has been attached to.

url

THis returns the URL that the message will link to. This should be overridden to provide application-specific URLs. The default implementation returns the BaseURL setting for the application.

Releases

2 releases since Debian 6.0 (Squeeze); the text changed 1 time.

  1. 6.0
  2. 7

Author

Andrew Sterling Hanenkamp, "<[email protected]>"

From libjifty-plugin-comment-perl 1.00-2 in Debian 7 (Wheezy). Parsed by carta from the page's man source.