Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Robert DeHaan 5 posts 27 karma points
    Feb 10, 2010 @ 01:46
    Robert DeHaan
    0

    Comment Moderation, How?

    Hello Community, hopefully someone can assist me here.

    I have installed Blog 4 Umbraco and love it!  My question is regarding moderating the comments.
    We want to allow visitors to leave comments but do not want them displayed until they are approved.

    I see that a form exists, but do not see how to access the form, or to set the Blog as moderated.

    What am I missing? Where can I find it?

    Thanks in advance!

    - Robert

  • Jeff 30 posts 62 karma points
    Feb 10, 2010 @ 17:53
    Jeff
    1

    I have not tried it, but I did find this link:

    http://umbraco.org/blog/2009/12/10/blog-4-umbraco-2010-%E2%80%93-comment-moderation

    Hope it helps... I'll be reviewing it myself soon.

  • Robert DeHaan 5 posts 27 karma points
    Feb 12, 2010 @ 16:30
    Robert DeHaan
    0

    Well, almost solved.

    I cannot seem to see any comments in the dashboard, and I was hoping that "Moderating" prevented comments from autoposting.

    Looks like a dig into the source code to change that behaviour.

  • Chris McVittie 103 posts 75 karma points
    Feb 12, 2010 @ 18:24
    Chris McVittie
    0

    I don't think this functionality exists in Blog4Umbraco - I was looking for it myself, and there doesn't seem to be a publish flag or concept anywhere.  

  • Robert DeHaan 5 posts 27 karma points
    Feb 16, 2010 @ 02:51
    Robert DeHaan
    2

    For anyone looking for this answer I found it and thanks to the well wriiten code, it's easy to implement.

    In the sourcecode in the 'Library' folder is base.cs.

    In base.cs is the CreateComment function.

    In said function look for the spam checker code -- if (checker != null); directly after that code, reset the comment as spam (isspam=true;). Now you can go into Umbraco Admin, click on the Content Folder, click the "Comments" tab in the dashboard.  All comments have been flagged as spam and can be reviewed and approved.

    Nice Work Tom and all involved!

    Here is how the code should look:

     

     

    if (checker != null)

    {
    isspam = checker.Check(parentId,
    post.UserAgent, post.UserHostAddress,
    name, email, website, comment);
    }

    isspam =

    true;

  • Jeff 30 posts 62 karma points
    Feb 22, 2010 @ 23:50
    Jeff
    0

    Thx for following up!

  • Chau 66 posts 97 karma points
    May 06, 2010 @ 05:07
    Chau
    0

    is it possible to modify an existing installation to do this?

    thanks

  • Jason Prothero 416 posts 1226 karma points c-trib
    Jun 18, 2010 @ 01:36
    Jason Prothero
    1

    Another option is to create a new "Checker" type derived from the SpamChecker class.

    I created this class and named the file "AlwaysMarkSpamChecker.cs":

    using System;
    using System.Collections.Generic;
    using System.Web;
    using Umlaut.Umb.Blog.Interfaces;
    using Joel.Net;

    namespace Umlaut.Umb.Blog.Spam
    {
        public class AlwaysMarkSpamChecker : SpamChecker
        {

            public AlwaysMarkSpamChecker()
            {
                this.ProviderName = "AlwaysSpam";
            }

            public override Boolean Check(int nodeid,
                string UserAgent, string UserIp, string Author,
                string AuthorEmail, string AuthorUrl, string Content)
            {
                return true;
            }

            public override void MarkAsHam(int nodeid, string Author, string AuthorEmail, string AuthorUrl, string Content)
            {

            }

            public override void MarkAsSpam(int nodeid, string Author, string AuthorEmail, string AuthorUrl, string Content)
            {

            }

        }
    }

    Then I edited the /umbraco/plugins/blog4umbraco/SpamChecker.config file to look like this:

    <?xml version="1.0"?>
    <SpamChecker assembly="/bin/Umlaut.Umb.Blog" type="Umlaut.Umb.Blog.Spam.AlwaysMarkSpamChecker">
    </SpamChecker>

    That made it so that the comments were always marked as spam, but I can reuse the code for other projects and ust edit the config back to Askimet.

     

    I blogged this as well if you want to see more info: http://www.proworks.com/blog/2010/06/17/how-to-moderate-all-comments-in-blog-4-umbraco/

  • Dax Sargent 1 post 21 karma points
    Jan 13, 2011 @ 15:32
    Dax Sargent
    0

    I am a newbie regarding umbraco.  I am trying to set up the above comment moderation.  I can locate the spamchecker.config file, however I cannot find the location of the existing AkismetSpamChecker.cs to be able to create and save the new cs to mark new postings as spam.  Can anyone tell me the exact path within the umbraco installation this would be at?   I am not finding it via file search so I suspect I do not have this existing file and need to create the folder structure to drop the new .cs file into for implementing this, however I am simply grasping at straws on this.

    Thank you.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies