Copied to clipboard

Flag this post as spam?

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


  • trfletch 598 posts 604 karma points
    Jul 13, 2009 @ 13:17
    trfletch
    1

    Comments approval section, list of unapproved comments

    Hi,

    The next task with my comments I would like to do is have a section that shows unapproved comments so that the Umbraco user can approve them. The comments are being created as child nodes of the page that they relate to so as you can imagine they will all be in different locations, the comment node gets published automatically but it requires a checkbox to be checked before it becomes visible on the website. Ideally I would like an extra section in the Umbraco backend that lists all unapproved comments and gives the user the opportunity to approve them.

    I have been trying to follow this article to add another section to the backend but I am a bit stuck because my ASP.net knowledge is non-existant http://www.simm.dk/umbraco-corner/articles/making-custom-sections-and-trees-inside-umbraco---part-i.aspx 

    Can another offer any suggestions on this? Has it been done before? How easy is this going to be and what's going to be the best method of setting it up? Thanks in advance for any help

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

    Hi,

     

    Creating a specific umbraco section seems as a lot of overkill, you could quite easily build a small user control that can be hosted in umbraco as a dashboard control (it requires little programming - which you'll need anyway, whatever method is choosen)

    Find some inspiration on iterating documents in the system on this wiki page

    Examples of dashboard control configuration can be found here

     

    Hope this helps.

    Regards,

    /Dirk

  • trfletch 598 posts 604 karma points
    Jul 13, 2009 @ 14:01
    trfletch
    0

    Thanks Dirk, I will take a look and see what I can do. Looks like it's time for me to learn asp.net and how to create a user control.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 13, 2009 @ 14:05
    Dirk De Grave
    0

    Also, at cg09, I've heard about a 'widget' framework, which may be a better fit for such tasks. Not sure how far they got at the moment, but you'll find their project page at http://our.umbraco.org/projects/widgetframework

     

    Cheers,

    /Dirk

  • trfletch 598 posts 604 karma points
    Jul 13, 2009 @ 15:29
    trfletch
    0

    Hi Dirk,

    This is probably better suited to an asp.net forum but I thought I would be cheeky and ask anyway, I am trying to create my first ever user control using the code that your referenced, I have added the references to the DLL's that it asked for and I have got the following in my in my .cs file but it doesn't seem to like it when I try and build the project, what am I doing wrong, I guess I should really go away and take an asp.net course before I start trying to create user controls!

    using

     

    using

     

    using

     

    using

     

    using

     

    using

     

    using

     

    using

     

     

    namespace

     

    //get the document by its ID

    Document doc =

     

     

     

     

     

     

    Document[] children = doc.Children;

     

    Response.Write(childDoc.Text);

    }

    }

     

    //Root documents

    Document.GetRootDocuments();

    //Get Node IDs of a specific type

    DocumentType dt = DocumentType.GetByAlias(

    Document.getAllUniqueNodeIdsFromObjectType(dt.UniqueId);

    //Get documents which has publishing date set

    //and is either waiting to be published or is expired

    Document.GetDocumentsForRelease();

    Document.GetDocumentsForExpiration();

  • trfletch 598 posts 604 karma points
    Jul 14, 2009 @ 14:32
    trfletch
    0

    Ok I have enlisted the help of a developer now, I just wondered if there was a list of all the different GetDocuments commands, for example what is the one for getting unpublished documents? It seems that the example above shows the command for getting documents that are due to be released and one's that are due for expiration but it doesn't show the command for listing documents that have not been published.

  • 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