1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / ForumManager.Executed

ForumManager.Executed

2 posts, 0 answered
  1. Mihai
    Mihai avatar
    1 posts
    Registered:
    27 Mar 2008
    27 Aug 2008
    Link to this post
    I've tried to subsribe to the ForumManager.Executed method to perform some custom operations. However subscribing to this event
    in the following manner has no effect.

    void Application_Start(object sender, EventArgs e)
        {
            ForumManager.Executed += ForumManager_Executed;
            CmsManager.Executed += ForumManager_Executed;
        }

        static void ForumManager_Executed(object sender, Telerik.ExecutedEventArgs e)
        {
           
        }

    The ForumManager_Executed method is only fired when a cms action is performed (e.g. create, delete page). Can somebody help me with this? Thanks !
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    29 Aug 2008
    Link to this post
    Hello Mihai,


    We regret to inform you ExecuteEvent is available for Generic content based modules as News, Blogs etc.

    Probably, we will implement this for the Forums in our next major release.

    Here is a simple example when an event is fired when you create news. The user is redirected to yahoo.com

    .cs (placed in App_Code)
    public static void ContentManager_Executed(object sender, ExecutedEventArgs e)       
    IContent targetContent = e.Data as IContent;             
    if(targetContent != null)            
      {                  
         if(e.CommandName == "CreateContent" && targetContent.ProviderName == NewsManager.DefaultContentProvider)                    
         HttpContext.Current.Response.Redirect("http://www.yahoo.com");              
      }          
    }  

    Global.asax
    void Application_Start(object sender, EventArgs e)     
    {            
      // Code that runs on application startup 
      Telerik.Cms.Engine.ContentManager.Executed += new EventHandler<Telerik.ExecutedEventArgs>(NewsEvents.ContentManager_Executed);         
    }  

    We have also responded you in the support thread.

    Hope this gives you some light.

    All the best,
    Ivan Dimitrov
    the Telerik team
2 posts, 0 answered