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

Forums / General Discussions / Override insert method

Override insert method

8 posts, 0 answered
  1. Neil
    Neil avatar
    82 posts
    Registered:
    21 Oct 2006
    12 Nov 2010
    Link to this post
    Hi,

    When a blog post is being created how is the insert method overridden before committing to database using the API and a custom class, an example would be useful.

    Regards,

    Neil
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    12 Nov 2010
    Link to this post
    Hi Neil,

    We use Web service to save the item and commit the transaction. Options

    1. Create a custom service and replace the default one in  Administration >> Settings >>  Blogs >> Controls >> Post Backend >> Views

    2. Use the delegates App.Executing and App.Executed

    protected void Application_Start(object sender, EventArgs e)
    {
        SystemManager.ApplicationStart += new EventHandler<EventArgs>(SystemManager_ApplicationStart);
    }
     
    void SystemManager_ApplicationStart(object sender, EventArgs e)
    {
        App.Executing = Executing;
        App.Executed = Executed;
    }
     
    void Executing(object sender, ExecutingEventArgs args)
    {
    }
     
    void Executed(object sender, ExecutedEventArgs args)
    {
    }


    Best wishes,
    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
  3. Neil
    Neil avatar
    82 posts
    Registered:
    21 Oct 2006
    12 Nov 2010
    Link to this post
    Hi Ivan,

    Maybe its worth running past you what I'm trying to do as the view is not in my version and not trying to reinvent just add functionality not in the box.

    I have tested and have twitter configurations that authenticate in my test site and need to get the title published on twitter. My code is currently in a custom server control.

    Best Regards,

    Neil
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    12 Nov 2010
    Link to this post
    Hi Neil,

    The option is are

    1. Custom web service
    2. Using the delegates
    3. Using the API to get the latest item where you should have some custom service that monitors for changes - title , publication_date.

    We have implemented similar functionality in Sitefinity 4.0 - PublishingManager which  will give you an option to publish the item automatically on some social networks like twitter and facebook.

    • PipeSettings - class defines the behavior of a pipe - twitter, facebook etx. This pipe will be used by Telerik.Sitefinity.Publishing.PublishingManager
    • PublishingPipeBase class is a base implementation for publishing piles
    • Pipes are usually triggered based on system events or scheduled tasks, for example - upon the event of publishing a blog post , all content pipes related to the particular blog are triggered and import the post into the related publishing points.
    • The PublishingPipeBase allows you to transfers sitefinity generic content to and from publishing points by overriding  FormatOutputData
    • There is a "module" - PublishingModule - maintains initialization and installation of the pipes. By overriding Initialize you can initializes the custom service.To register a pipe you can use  PipeFactory.RegisterPipeType("Content",typeof(SitefinityContentPipe));

    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
  5. Neil
    Neil avatar
    82 posts
    Registered:
    21 Oct 2006
    12 Nov 2010
    Link to this post
    Thanks Ivan,

    Looking via reflector now, does this mean this functionality is included in the final release and I've been wasting time?

    Best Regards,

    Neil
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    12 Nov 2010
    Link to this post
    Hello Neil,

    What I can tell you is that we will have these pipes.

    Greetings,
    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
  7. Neil
    Neil avatar
    82 posts
    Registered:
    21 Oct 2006
    12 Nov 2010
    Link to this post
    Thanks Ivan,

    Looks like one for the marketplace, is there any code examples and documentation how these pipes work?

    Best Regards,

    Neil
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    12 Nov 2010
    Link to this post
    Hi Neil,

    The PublishingManager has not been documented yet and we have not worked on a samples for it.

    All the best,
    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
8 posts, 0 answered