More in this section

Forums / Developing with Sitefinity / Forum module -> default thread status

Forum module -> default thread status

3 posts, 1 answered
  1. Kenny South
    Kenny South avatar
    16 posts
    Registered:
    11 Jan 2010
    18 Jan 2010
    Link to this post
    Hi,

    I was wondering if it was possible to modify the default thread status when the moderation is active.

    I wish all the new thread could have the hidden status when created.

    Is this a matter of development or configuration?

    Thanks!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    18 Jan 2010
    Link to this post
    Hi Kenny South,

    You can control the thread visibility form Sitefinity's backend. Please take a look at the attached screenshot. By default the thread is not hidden. You can control this programmatically by adding the following logic in your Global.asax

    void Application_Start(object sender, EventArgs e)
    {
        Telerik.Forums.ForumManager.Executing += new EventHandler<Telerik.ExecutingEventArgs>(ForumManager_Executing);
     
    }
     
    void ForumManager_Executing(object sender, Telerik.ExecutingEventArgs e)
    {
        Telerik.Forums.IPost post = (Telerik.Forums.IPost)e.CommandArguments;
        if (e.CommandName == "CreatePost")
        {
            post.Status = Telerik.Forums.PostStatus.ThreadHidden;
        }
    }


    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  3. Kenny South
    Kenny South avatar
    16 posts
    Registered:
    11 Jan 2010
    18 Jan 2010
    Link to this post
    Actually i wanted the hidden status on new threads created with the public control.

    Anyway you gave me the solution, moreover a simple one.

    Thanks a lot
Register for webinar
3 posts, 1 answered