Copied to clipboard

Flag this post as spam?

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


  • Lee 1130 posts 3088 karma points
    Jul 24, 2009 @ 07:17
    Lee
    0

    Blog 4 Umbraco Comments - Can I Make It So They Have To Be Authorised?

    I am using Blog4Umbraco for a recent project, but just noticed if you leave a comment it goes instantly live?  I'm guessing I just need to switch a method in the comments usercontrol?  Can you give me some pointers please...

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jul 24, 2009 @ 08:18
    Peter Dijksterhuis
    0

    You'd have to go into the code for that. Look in the frmBlogComment.acsx.cs. If you comment 2 lines (Publish and UpdateDocumentCache) it won't be published yet, but the comment will be saved in the backend.

    Does this help?

    Peter

  • Tim 225 posts 690 karma points
    Jul 24, 2009 @ 09:58
    Tim
    0

    Hi

    I recently wrote an event handler which does exactly that.

    Basically it stops publication of the blog comments until you have ticked an approved checkbox on the blog comment and published.

    I'll dig it out for you - give me 5 mins!

    T

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 24, 2009 @ 10:00
    Dirk De Grave
    0

    @Peter: think Publish is required to make it appear in backend (ok, name's not really a good choice), but basically publish prepares a document for publishing (it's a two step process, making it possible for a 'code' user to publish and a real content editor to do the actual publish, so it becomes visible at the frontend)

     

    Cheers,

    /Dirk

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jul 24, 2009 @ 10:07
    Peter Dijksterhuis
    0

    @Dirk are you sure? Maybe it's just me that got used to the way it worked in v2 :P

  • Comment author was deleted

    Jul 24, 2009 @ 10:13

    Nope Peter is correct, if you comment  out the 2 line it won't be published.

  • Tim 225 posts 690 karma points
    Jul 24, 2009 @ 10:16
    Tim
    101

    Hi,

    Here's my extension which will suppress publishing of comments unless a checkbox is ticked in the backend (so you can pre-vet them).

    It can also be extended to allow for emailing the site owner when the new comment is added - however I've not got that enabled in this version.

    If this is of interest I can add it in and package it all up.

    http://www.thecogworks.co.uk/umbraco-cogworks-extensions.zip 

    You just need to drop the dll into your bn folder and add the following property to the BlogPostComment document type.

    Name: Approved

    Alias: approved

    Type: True/False

    Hope this helps!

    T

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 24, 2009 @ 11:06
    Sebastiaan Janssen
    0

    Just to add: I've just implemented a simple anti-spam measure (if that's what you're after). I will enhance it later, but for now it seems to be working. If you're interested I can share the code. Will submit the code to Tim soon anyway :)

  • Dan Evans 629 posts 1016 karma points
    Jul 24, 2009 @ 11:43
    Dan Evans
    0

    You can use the built in umbraco notifications to get email when a comment is added - select sendtopublish if you are not publishing.

    Dan

  • trfletch 598 posts 604 karma points
    Jul 24, 2009 @ 13:51
    trfletch
    0

    An alternative is to use doc2form like I did and set it so the comments become child nodes that are unpublished, I then modified the Content Maintenance add-on to make it list all unpublished comments, this was then put into a new section in the Umbraco backend so that Umbraco users could see a list of unpublished comments and then publish them as required.

  • Lee 1130 posts 3088 karma points
    Aug 22, 2009 @ 10:58
    Lee
    0

    Works perfectly Tim - Thanks

  • Nathan 16 posts 38 karma points
    Oct 01, 2009 @ 04:48
    Nathan
    0

    Hi all,

    Where would one find the source code for this package?  I'd like the user control and dll source if at all possible so I can make some tweaks.

    Thanks,
    Nathan

  • Nathan 16 posts 38 karma points
    Oct 01, 2009 @ 05:13
    Nathan
    0

    I'm not sure where all the other post went that gave my question context.  I'm looking for the source code from Blog 4.0.

    Thanks

  • Comment author was deleted

    Oct 01, 2009 @ 08:53

    Hi Nathan,

    Check here: http://blog4umbraco.codeplex.com/

  • Scott Hugh Alexandar Petersen 349 posts 164 karma points
    Oct 01, 2009 @ 10:40
    Scott Hugh Alexandar Petersen
    0

    Nathan why do you want to authorize them?

    You can do two things from the top of my head at least. You can add CAPTCHA or you can add a boolean value on the comment and only the ones you check will appear on the site. So you would have to check each comment.

    But if it is for spamming comments I would put in CAPTCHA. I did it on this blog: http://www.valutabloggen.dk/2009/9/28/gbpusd-head-and-shoulders.aspx and it is rather easy to manage.

    And by the way what kind of tweaks would you like to make?

    Scott

  • Nathan 16 posts 38 karma points
    Oct 03, 2009 @ 18:26
    Nathan
    0

    @Tim - Thanks, not sure how I missed that.

    @Scott - Authorize them?  I'm looking to authorize anyone.  I just wanted to adjust the markup in the user control so I can target it with css.  I also want to improve the validation (prevent markup in the comment field, url validation, improve validation error UI).  I might allow limited html comments with XSS protection.

Please Sign in or register to post replies

Write your reply to:

Draft