Override insert method

Posted by Community Admin on 03-Aug-2018 10:25

Override insert method

All Replies

Posted by Community Admin on 12-Nov-2010 00:00

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

Posted by Community Admin on 12-Nov-2010 00:00

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

Posted by Community Admin on 12-Nov-2010 00:00

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

Posted by Community Admin on 12-Nov-2010 00:00

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

Posted by Community Admin on 12-Nov-2010 00:00

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

Posted by Community Admin on 12-Nov-2010 00:00

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

Posted by Community Admin on 12-Nov-2010 00:00

Thanks Ivan,


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

Best Regards,

Neil

Posted by Community Admin on 12-Nov-2010 00:00

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

This thread is closed