I am using Umbraco 4.6.2, and need to expand the default notifications provided to it. For this question, suppose I am trying to add the "unpublished" notification.
In this I think every After doing this, I can subscribe to the unpublished notification to the user (am I remember any step here?). Will it now send notifications automatically? I'm feeling, so the next work I did is addicted to the unpublished event: So the bit of code that is not real / I need some points: Is this the right way to check Has any user subscribed to a particular notification? How do I send a notification using the default Umbraco settings? (For example, email generated like other notifications) If this is not possible and I have to make my email: How can I get an email address stored in umbracoSettings.config How do I copy the default Umbraco formatting used? I should manually copy it or a good way to do this (programmatically). Any help (or link also for relevant examples) is appreciated: & gt; My colleague has done this job. Create a class that you want to override the action you have notifications for In the override category, you have a to set < B> div> \ umbraco \ presentation \ umbraco \ dialogs \ notifications.aspx.cs it
verb Has a ShowInNotifier property - how can I set this value to
true unpublished action? Is there a need to modify the core codebase, or is there any good way that I can honestly expand the Umbraco?
Public class CustomEvents: ApplicationBase {public custom event () { Document.AfterUnPublish + = new document Unpublished document handler (Document_AfterUnPublish); } Zero Document_AfterUnPublish (Document Sender, umbraco.cms.businesslogic.UnPublishEventArgs e) {var user = User.GetCurrent (); If (! String.IsNullOrEmpty (user.Email) & amp; user joins GetNotifications (sender.Path). ("Unpublish")) // Send a notification here by using default Umbraco settings, or create email, and manually Send as: String umbracoNotificationSenderAddress = ""; // How to obtain the address stored in umbracoSettings.config - & gt; & Lt; Notifications & gt; - & gt; & Lt; Email & gt; // How to use the same theme / message formats used for other information? Back to the link with the content? String topic = "Notification of unpublished publish" + MyUtilities.GetFriendlyName (sender.Id); String Message = Mythivelles. Getfreeendenline (Sender.ID) + "has just been unpublished."; Umbraco.library.SendMail (umbracoNotificationSenderAddress, user.email, subject, message, true); }}
/ umbraco / cms / actions
public The class can see all the functions in ActionUnPublishOverride: umbraco.BusinessLogic.Actions.ActionUnPublish, IAction {... see if other actions like to find out what to put here!
public four letter to set the event to hook in it
Comments
Post a Comment