More in this section

Forums / Developing with Sitefinity / Extending comments

Extending comments

2 posts, 0 answered
  1. Christian Ecker
    Christian  Ecker avatar
    7 posts
    08 Mar 2010
    10 Aug 2010
    Link to this post

    I would like to extend the comments a little bit-- in this case, I would like to add avatar images and a reference to the authentication source of the user (using OAuth for Facebook etc., or built-in Sitefinity profile, etc., whichever is available at the time).  How can I go about extending the comments?  It doesn't seem to be a generic content type.

    Would my best bet be to come up with a new generic content type for this, or is there an easy way to get these comments in the shape I want them?


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    10 Aug 2010
    Link to this post
    Hello Christian Ecker,

    The public controls use CommentsList class for creating and showing comments. To get avatars you need to disable anonymous access for your users, so only the authenticated will be able to leave comments. You will fine a sample code here. Inside of the template for CommentsList control you have to add an ASP.NET Image control. Then you have to override InitializeControls of CommentsList control and check the current username - UserManager.GetCurrentUserName(). Then you can pass the username to ProfileBase class and make an association with a profile of this user.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered