Saturday, November 22, 2008     | Register
To start or answer a thread you will need to login...


Forum Guidelines

Please ensure you follow the bug-raising guidelines (e.g. post the full error from your Event Viewer) if you are raising a support call. To request a feature in a module, please use Feature Requests (unless you want to discuss it here in more detail first). If you have an urgent feature that you would like to see in the product then you should consider a Sponsored Enhancement.

 

First Time User? Make sure you have read the Module Config Guide in the documents folder of each module. Also check out this handy Module Deployment Guide (written by a Smart-Thinker customer!)

Configuration issues and no time to read the Forums/Documentation? See our DotNetNuke Premium Support Service.

 

We need your opinion! Please read our proposed new CrowdSourcing development method and let us know if you would be interested and if it might work.

 
 
  Forums  DotNetNuke  Smart-Thinker W...  How to define multiple Custom Email Types
Previous Previous
 
Next Next
New Post 1/31/2008 12:23 AM
Informative
  Rodney Joyce
2908 posts
www.DNNDir.com
1st Level Poster




How to define multiple Custom Email Types  (Australia)
Modified By Rodney Joyce  on 6/15/2008 7:33:23 AM)

When you have more than one Custom Wall type on your portal then you may need to define more than 1 Custom email type. This is how you do it:


Thanks
Rodney
See our modules in action on PokerDIY, a social network for home poker players

Smart-Thinker DotNetNuke Development Blog
 
New Post 6/15/2008 6:32 AM
  Rodney Joyce
2908 posts
www.DNNDir.com
1st Level Poster




Re: How to define multiple Custom Email Types  (Australia)

There are 4 different possible mails for each WallType (Profile, Event, Group and Custom) - I'll show the custom ones as this is what we are focusing on. These are in the PostEdit.ascx.resx resource file in the Wall module.

NewPostNotificationCustom.Body, NewPostNotificationCustom.Subject, NewReplyNotificationCustom.Body, NewReplyNotificationCustom.Subject

The problem I wanted to overcome was that you could have multiple custom types (on PokerDIY I have added the Wall module at Poker League and Poker Game level (a game is not an event). Hence one language string would not suffice as I want the emails to say slightly different things and they need to punch in to the respective poker league and poker game (for example - I could not hard-code a tabID into one template for both types). The solution was to insert the ModuleID into the language string (this is possibly an approach the core could adopt to allow multiple resource customization at Portal and even Module level instead of Host level as it is now).

Lets look at the poker league custom wall module on PokerDIY. The ModuleID of the wall is 1972. So when a reply or new post is posted here it now tries to retrieve the string based on the moduleID, eg.

NewPostNotificationCustom1972.Body and NewPostNotificationCustom1972.Subject  (for a new post)

If it finds nothing then it will use the shipped defaults (NewPostNotificationCustom.Body and NewPostNotificationCustom.Subject). This means that if you only ever have 1 custom type you can just change these in the standard manner.

The only drawback is that the core Language Editor (Under Admin -> Languages) does not support adding of language strings to the .resx files (please lobby for this on the core forums!) so you have to add the strings manually to the .resx file. I wont go into too much detail on how the Language Editor works as there are tons of documents on this, but basically as soon as you edit a .resx file through the UI (I always recommend doing it this way) then it creates a copy of the file with the PortalID and Culture (e.g PostEdit.ascx.resx makes a new file called PostEdit.ascx.Portal-PortalID.resx for en-US translations). This ensures that the file is not overwritten on upgrade. It is important therefore to make sure you add these strings to the copied file (if one does not exist then change an existing string through the UI to force the duplicate file to appear.


Thanks
Rodney
See our modules in action on PokerDIY, a social network for home poker players

Smart-Thinker DotNetNuke Development Blog
 
New Post 6/15/2008 6:53 AM
  Rodney Joyce
2908 posts
www.DNNDir.com
1st Level Poster




Re: How to define multiple Custom Email Types  (Australia)
Modified By Rodney Joyce  on 6/15/2008 7:54:17 AM)

Thought I would just confirm what I suspected - when you view the PostEdit.resx file again through UI after you have manually edited the file it displays:

 

"This files contains obsolete resources which are no more needed. Click save to remove these items permanently."

 

and then erases it when you save. I guess this helps in some scenarios but not in this one. I made a copy of the file before hand in case I do this by mistake...


Thanks
Rodney
See our modules in action on PokerDIY, a social network for home poker players

Smart-Thinker DotNetNuke Development Blog
 
Previous Previous
 
Next Next
  Forums  DotNetNuke  Smart-Thinker W...  How to define multiple Custom Email Types
Top Threads
In the past 1 week, we have 29 new thread(s) and 70 new post(s)
The most popular thread has been Re: Multipaid Sponsored Enhancements
The most active thread has been Multipaid Sponsored Enhancements / Crowdsourcing to improve modules
Smart-Thinker is powered by DotNetNuke - please support us and DotNetNuke - DotNetNuke Powered!
© 2008 Smart-Thinker   |  Privacy Statement  |  Terms Of Use