Copied to clipboard

Flag this post as spam?

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


  • Daniel Draper 36 posts 57 karma points
    Jan 28, 2011 @ 07:09
    Daniel Draper
    0

    Comment moderation with a twist

    I am building a custom blog for educational purposes. I have an idea for how I would like to moderate my comments but I am current unsure how to complete the following:

    An administrator in the Umbraco Admin area would have a dashboard like Blog4Umbraco (easy) but on top of this if a user clicks on a blog post I want a tab called Comments with a list of the comments.

    Does anyone have any recomendation on how to implement this?

     

    Cheers,

    Daniel

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jan 28, 2011 @ 10:10
    Sebastiaan Janssen
    0

    You could quite easily build your own dashboard control for this I think, just have a look at the current implementation of the list of comments that need to be moderated: http://blog4umbraco.codeplex.com/SourceControl/changeset/view/61225#690486


  • Daniel Draper 36 posts 57 karma points
    Jan 28, 2011 @ 12:23
    Daniel Draper
    0

    Sorry my explination was a little unclear and I was unable to edit my post, XSLT error!

    What I want is for an administrator in Umbraco to be able to click on a post in the content tree and then one of the tabs to be comments, this tab will display a list of comments specific to this post.

    I was thinking about building a usercontrol and using the macro container data type. Can you/anyone think of a better solution?

    Also is there a reason why you would add the comments to the database and not as child nodes?

  • Timothy Walters 1 post 21 karma points
    Feb 15, 2011 @ 05:58
    Timothy Walters
    0

    Hi Daniel,

    I just recently had the same issue, solved it creating a custom data type by using the feature in 4.6.1 to easily create a custom data editor.

    Steps:

    1. Create a UserControl that also implements the IUsercontrolDataEditor interface
    2. Interface requires a "value" property of type object, I just created an auto-property as I don't care about the value
    3. Setup your control as normal, bearing in mind that you can read the ID of the current page using Convert.ToInt32( Request.QueryString["id"])
    4. Copy your usercontrol to the usercontrols folder, copy your DLL to the bin folder
    5. Add a new data type, set the render control to "umbraco usercontrol wrapper", save, then set the usercontrol to your control and save again
    6. Update the document type, I added a Comments tab, then added a property to that tab of my new data type
    7. Now view an article and see your "Comments" tab with your "Comments" field that will render using your custom control

    NOTE: even if the tab isn't active, it's still loaded, so don't go loading every single comment in the Page_Load() and filter in code, try to filter in the DB

    I setup a solution that switched between "Pending", "Rejected" and "Approved" filters with links to change the status of a comment.

Please Sign in or register to post replies

Write your reply to:

Draft