Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Best Practise for storing images at portal level for modulesBest Practise for storing images at portal level for modules
Previous
 
Next
New Post
5/17/2008 10:19 PM
 

I had to make a similar decision as to where to store e-mail templates for an upgraded version of my ePrayer module. The decision was further complicated in that the first released version did not allow for portal level templates instead storing the one and only set of templates in a sub-folder of the module folder and allowing only the host account to edit the templates.

I finally opted for storing the default templates in the folder /Portals/_default/WESNet/ePrayer/Templates and the portal specific ones in the folder /Portals/[PortalID]/WESNet/ePrayer/Templates. When the module package is iinstalled, templates contained in the package are placed into /Templates sub-folder under the module folder. Then, in an implementation of IUpgradable, templates are copied into the /Portals/_default/WESNet/ePrayer/Templates folder (creating it if necessary) only if templates do not already exist - to avoid overwriting custom modified templates during a module upgrade. There is a Host accessible only setting as whether or not portal level templates and their editing by portal admins are enabled. If portal level templates are enabled, when the templates need to be referenced, a check is first made for their existance in the portal specific template folder. If not found, the templates under Portals/_default are used instead. Default templates can only be edited by the host account. Should the portal admin edit (and save) a default template for the first time, it is then and only then that a portal level template is created.

One problem I have not been able to solve gracefully is how to delete templates, etc. stored in folders under /Portals/_default/ or /Portals/[PortalID]/ when either the module definition is deleted or when the last instance of the module in a specific portal is deleted as the current installer/uninstaller cannot run custom code in response to module definition deletion or module deletion. I am in hopes that this need will be addressed in the new universal package installer when it is released.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
5/18/2008 7:52 PM
 

I would want per-portal template and image files to either be stored automatically in portals/portalID/templates/xxx or have a path option in the module settings where the admin could specifiy the path name, but still only within the portal folder. It's the only way to keep things like display templates, themes and images like ratings stars separate and secure.

All per-portal files must logically reside in the portal folder. In most modules that have such items stored in the desktopmodules folder, the templates are accessible by all portals, which is simply wrong.

Rob

 
New Post
5/19/2008 4:23 AM
 

Thanks for all the suggestions/feedback - the main requirement is that all my Smart-Thinker modules can read from the same store (for example, the SendMessage icon or the Rating Stars are used by all my modules) so it doesn't seem right putting them under a specific module folder, unless I made a Smart-Thinker generic folder under DesktopModules which also seems wrong.


Thanks,
Rodney
Smart-Thinker - Social Networking modules for DotNetNuke
The DotNetNuke Directory - Are you listed?
PokerDIY - Example Implementation of DNN Social Network
Do use DNN a lot? Try the DotNetNuke Toolbar to save you time!
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Best Practise for storing images at portal level for modulesBest Practise for storing images at portal level for modules


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out