I created an alternated notification feature for SharePoint 2010. It’s a demo project for SharePoint 2010. I’ve done it for some practice in SharePoint development and just for fun 🙂
It’s intended to replace the default notification feature of SharePoint 2010 where you can subscribe to notifications list based. – With my feature a user can subscribe to all changes of a SharePoint Web by using a menu entry in the Personal Actions menu.
The notification mail is send to any subscribing user once a day. (Please notice that at the moment there is no security trimming for the notification mail!)
Project site: http://spwebchangelog.codeplex.com
How it works:
1. There is a web scoped feature and a farm scoped feature.
2. The web scoped feature is responsible for the Personal Actions menu entry and the change log at web scope.
3. The farm scoped feature deploys a timer job that scans each web every day and sends the notification mail if there are any changes in the web.
4. The job can be scheduled as you like.
5. On each web where the web scoped feature is active, there are two hidden lists:
- “Web Change Log Subscriptions”: http://sharepoint.local/Lists/ikWCLE18669B3ADD1/AllItems.aspx
This list contains an list item for each user that has subscribed for notifications. If a users unsubscribes the list item is removed.
6. If the web feature is active the “Change Log” list will contain a list item for each change in other lists of the web.
A list event receiver recognizes each list level change: Created lists, deleted lists. It adds list item event receivers to each list in the web.
A list item event receiver creates items in the “Change Log” list for each list item action: add, update, delete.
7. If the web scoped feature is deactivated the list event receiver and all list item event receivers are removed. If the feature gets activated the list event receiver and a list item event receiver for each existing list are registered.
8. The farm scoped feature deploys a timer job that scans each web of a specific web application. If the web feature is active in a web the timer job looks for the change log list and for subscribers. If there are at least one subscriber and at least one one change since the last job run the notification mail is send.
9. It’s localized for german and english. The notification mail text is part of a resource file. But the resource file value for the mail text can be replaced by using a Web Property.
10. The notification mail is not security trimmed! That’s important for use in a production environment!
11. It’s tested in both a german and an english SharePoint system with both language packs, with multiple site collections and multiple webs and sub webs. I’d like to hear your experiences. Please report any bug. Feel free to modify it but please send me your improvements!