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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0"Global" settings for my modules"Global" settings for my modules
Previous
 
Next
New Post
7/10/2006 2:04 PM
 
Hello,

I'm creating a set of modules for my DNN site that will be used on several portals within the site. Each portal will have a database associated with it (different from the main DNN database), and my modules will be pulling info from those databases. I've got it working for a single portal (by hardcoding the DB name), but now I need to extend it to several portals.

From the tutorials and books I've been reading, it looks like I can accomplish this by creating a settings control for each of the modules, and have the portal's admin user enter the same database name on each and every module. This, of course, isn't ideal.

What I'd like to do is have some sort of single "Settings" screen for ALL of my modules where the admin user can enter their database name in a single spot, and then all of the modules on that portal will use the specified database.

Has anyone done anything similar? Care to give me suggestions? I'm not sure how to accomplish this.

Thanks
-John
 
New Post
7/10/2006 2:16 PM
 
Some options you have are

1) Would be to have a config file that is located in your modules directory that the user can enter global setting used by all instances of you module.

2) Add a section to the web.config file that constains global setting just used by your module.  If you did this option you would need to remember to copy over the settings to new web.config when you upgrade DNN.

3) Create an admin module for you module that all it does is provide a way to set global settings.  This module would write the settings to a table created in the DNN Database to hold the global settings.  Your modules would then get the information from this table then connect to the database in the global settings table.

--------------------

#1 & #2 would be the best solution if this is for an personal site and the module will only be used in-house and you have easy access to update either the config or web.config file.

#3 would be a better soltuion if this is a module that you were going to distribute commercially for other people to use.
 
New Post
7/10/2006 2:57 PM
 

" To the man who only has a hamme, everything starts to look like a nail"

I have been looking at DNN lists and, while it is not a normal use,  you could create a list with a single entry for your database name. Then each module could get the name from the list.  The user interface for adding and editing is then provided for you.  It might not be intuitive but you could implement it quickly

FYI lists are on the host menu

The following link to a discussion shows examples on how to get info from the list

http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/108/threadid/26625/scope/posts/Default.aspx

mj


Michael Jackson
Brillnat.com
Custom module development
Database access tokenized HTML modules
 
New Post
7/12/2006 12:23 AM
 
MJ, interesting solution for his use case.  Just goes to show the ingenuity of members of this community.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0"Global" settings for my modules"Global" settings for my 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