Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Notify Admin or Notify Moderator?

Quote Reply
Notify Admin or Notify Moderator?
Hi,

Is there a system in place that I can turn on, that would put an icon and a blurb of text at the bottom of every message that would say something to the effect of:
[NotifyIcon] Click to notify the site admin if the message above contains any advertising, spam, or objectionable material.

Then when they click on it, it sends either a Private Message to the admin, or it opens up a page that they can enter some quick text about why they are reporting the message and gives the message url when it sends the information submitted to an adminstrator.

I know this is an extremely useful feature on all the other community websites that I run, and it's rarely a day goes by that one forum or another doesn't have a member reporting some sort of junk, spam, or advertisement message that some spammer decided to post. It allows me to quickly get to the message in question, see if there is any objectionable material and take action.

There is something like that built into Gossamer Forums right? So how do I go about turning it on? I went through the setup area but didn't see anything that might do this, but I could have missed it not knowing what I might be looking for.

Thanks,
Quote Reply
Re: [Westin] Notify Admin or Notify Moderator? In reply to
Unfortunately, gforum 1 doesn't have this functionality, but we did add this to the currently unreleased gforum 2.

Adrian
Quote Reply
Re: [brewt] Notify Admin or Notify Moderator? In reply to
Okay,

Is there then a way to encode a url to send a private message that would put the phrase "Please include the message URL in the body of this message" so that I can put a simple text link on the bottom of every message so that when people click it, it will open up their browser window to send a PM to the site moderator? Because I know if i don't put that, nobody will include the url to the message in question and it would be useless.

This would be better than nothing at all.
Quote Reply
Re: [Westin] Notify Admin or Notify Moderator? In reply to
Westin:

Here is what I use- works fine for me!

<%if current_user_id%>
<a href="gforum.cgi?do=NotifyMods&forum=<%forum_id%>&username=<%current_user_username%>&post=<%post_id%>&subject=<%post_subject%><%hidden_query%>" target="_blank">Report Post</a>
<br />
<%endif%>

This will set up the PM for you, so set this up in include_post_display.html

Now you need two globals:

NotifyMods:

sub {
my $forum_id = $IN->param('forum');
my $post_id = $IN->param('post');
my $username = $IN->param('username');
my $post_subject = $IN->param('subject');
return {forum_id => \$forum_id,
post_id => \$post_id,
post_subject => \$post_subject,
username => \$username,
email => ""};
}

and

ConfirmNotifyMods:

sub {
my $forum_id = $IN->param('forum_id');
my $post_id = $IN->param('post_id');
my $username = $IN->param('username');
my $post_subject = $IN->param('post_subject');
my $email = $IN->param('email');
my $reason = $IN->param('reason');
my $subject = qq~Moderator Notification on Post #$post_id~;
my $message = qq~
$username has reported the post as inappropriate: $post_subject.
Reason Provided: $reason
This post can be located at: http://YOUR URL/forum/gforum.cgi?post=$post_id
~;
require GT::Mail;
$CFG->{smtp_server} or $CFG->{mail_path} or return 'No mail path or SMTP server set!';
my $mailer = GT::Mail->new(
to => $email,
subject => $subject,
from => $CFG->{admin_email},
msg => $message
);
local $@;
eval {
$mailer->send($CFG->{smtp_server} ? (smtp => $CFG->{smtp_server}) : (sendmail => $CFG->{mail_path}))
} or return "Unable to send Notification: " . ($@ || $mailer->error);
"Your Notification Has Been Sent.";
}

Finally, you will need two teplates. I have sent you MY versions, you will need to edit these for your use.

Have fun!
dave

Big Cartoon DataBase
Big Comic Book DataBase