New events in BlogEngine.NET 1.2

by Mads Kristensen 26. September 2007 04:56

UPDATE: If you need other events than the ones on the list, please tell me so they can be added. 

Because the next version of BlogEngine.NET has a build-in extension framework, we have exposed a lot of new events for extension builders. The more events that are exposed, the more power can an extension have.

You can write extensions that alter the rendered output of a post, block the download of a file or image, log all sorts of actions and a whole lot more. Here is a complete list of the events an extension can subscribe to:

  • Post.AddingComment
  • Post.CommentAdded
  • Post.RemovingComment
  • Post.CommentRemoved
  • Post.Rated
  • Post.Saving
  • Post.Saved
  • Post.Serving
  • Post.MarkedDirty
  • Page.Saving
  • Page.Saved
  • Page.Serving
  • Page.MarkedDirty
  • Comment.Approving
  • Comment.Approved
  • Comment.Serving
  • Category.Saving
  • Category.Saved 
  • Category.MarkedDirty
  • Search.Searching
  • Search.IndexBuilding
  • Search.IndexBuild
  • BlogSettings.Changed
  • ReferrerModule.ReferrerRegistered
  • Utils.EmailSent
  • FileHandler.Serving
  • FileHandler.Served
  • FileHandler.BadRequest
  • ImageHandler.Serving
  • ImageHandler.Served
  • ImageHandler.BadRequest
  • Pingback.Sending
  • Pingback.Sent
  • PingbackHandler.Received
  • PingbackHandler.Rejected
  • PingbackHandler.Accepted
  • PingbackHandler.Spammed
  • Trackback.Sending
  • Trackback.Send
  • TrackbackHandler.Received
  • TrackbackHandler.Rejected
  • TrackbackHandler.Accepted
  • TrackbackHandler.Spammed

43 events in total and then comes all the regular ASP.NET events like BeginRequest and ApplicationError etc. I hope this will get a lot of developers writing cool extensions and share them with the community. See how to write extensions for BlogEngine.NET - it's easier than you might expect.

* Only $4.95/month ASP.NET & Windows 2008 + IIS 7 Hosting! FREE SQL Included

Tags:

BlogEngine

Comments

9/26/2007 9:12:52 AM #

Joe

Is there a central place to store configurations for extensions?

Something like:
1) have a central .xml file with markup like
<extensionConfig>
  <section name="MyName">
    <customMarkup>
      <moreMarkup>VALUE</moreMarkup>
    </customMarkup>
  </section>

  <section name="AnotherSection">
    <myMarkup>
      <value>10</value>
      <anotherValue>20</anotherValue>
    </myMarkup>
  </section>
</extensionConfig>

2) Then you could have a class to query something like
ExtensionConfig.GetSection("MyName")
which would return the inner XML for that section. It would then be up to the extension to parse that XML.

I know you COULD use the appSettings, but something *like* what I described above would provide a more robust way to store values....In my opion, anyway.


ps.  how come sometimes it shows the monsterID in the preview, but other times it shows the generic pic?  (for me at least)

Joe |

9/26/2007 2:06:15 PM #

Mads Kristensen

@Joe. We don't have a central settings storage for this release. We have thought on various ways of doing it, but it is not as simple as it may sound. Most times you just want to store name/value pairs, but what if you want to store a more complex datatype like a dictionary?

Instead we allow you to store XML or text file for instance in the App_Data folder. That way you are totally in charge of your own settings. Use BlogSettings.Instance.StorageLocation to get the absolute path to the App_Data folder.

Mads Kristensen Denmark |

9/26/2007 8:40:50 PM #

Amr

Hello Mads,
When is version 1.2 release as I want to start customizing my new blog on it rather on 1.1
Best Regards.

Amr Egypt |

9/27/2007 12:17:14 AM #

Mads Kristensen

Hopefully this weekend or just after

Mads Kristensen Denmark |

9/27/2007 12:56:10 AM #

Joe

Is there a place to send extensions we write?

Joe |

9/29/2007 8:15:56 PM #

Mads Kristensen

Joe, there will be at about the same time as we release.

Mads Kristensen Denmark |

Comments are closed

About the slave

Mads Kristensen Mads Kristensen
Web developer at ZYB and founder of BlogEngine.NET. More...

LinkedIn ZYB Facebook Last.fm Twitter View Mads Kristensen's profile on Technorati

The Lounge

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008