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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Custom Field for Portal LevelCustom Field for Portal Level
Previous
 
Next
New Post
4/19/2012 11:25 AM
 

Good day.

I have what may be a simple question that I am just missing or not asking correctly.  I know that it is easy to add a custom value for user profiles.  But I was wondering if you can do the same at the portal level?  -  Some options I have thought about was using the copyright field or adding a column to the portal alias table but I know that could/would break upon upgrade and I would rather not mess with the core components as I am not sure what would break.

But what we are looking to accomplish is that I have a custom homegrown system that DNN uses to grab validate users against for their registration.  They are first loaded into the backend system and then given the information to login to a specific portal.   however as I move from our dev, to stg, to uat, to prod envs the portal number may not be consistent, so I can't use that, the home directory could change, and the URL does change.  (dev.mysitea.com stg.mysitea.com and then www.mysitea.com)  so I am trying to find a way to add a value to the site that gives it the code to validate the user during the registration process to make sure that the user is registering from the correct portal into our back end system.  portal A will always have a code of abcd, portal b would always have the code of 1234.  But this would not be known to the user.

So with my limited thinking, the easy thing would be to add a column to the portal alias table, and store abcd for portal a and 1234 for portal b.  When the user registers and we look back at the URL they are coming from and then the portal alias table / grab the additional column value/ and then pass it to our custom database it will pass their entry code and abcd or 1234   If their code and value matched great if not I could return an error back.

Is there a better way then adding a column to the portal alias table?  I don't see a way to add a field to  the portal level like i do for users...

 

thank you!

 
New Post
4/19/2012 8:04 PM
 

In a similar fashion to the core tables ModuleSettings and TabModuleSettings which store data as key/value pairs, the DotNetNuke framework provides the core PortalSettings table. In the class DotNetNuke.Entities.Portals.PortalController you will find static methods to save and retrieve developer defined portal-wide settings. These methods include:

public static void UpdatePortalSetting(int portalID, string settingName, string settingValue) 

 

public static string GetPortalSetting(string settingName, int portalID, string defaultValue) 

Unlike the methods for retrieving ModuleSettings or TabModuleSettings, the PortalSettings methods also include a couple that are strongly typed for boolean and integer values:

public static bool GetPortalSettingAsBoolean(string key, int portalID, bool defaultValue)
public static int GetPortalSettingAsInteger(string key, int portalID, int defaultValue) 

One point of caution . . . unlike ModuleSettings and TabModuleSettings which are also keyed on your specific ModuleId or TabModuleId, the PortalSettings are truly portal wide so be sure to use a unique settingName such as "WESNet_ByInvitation_UseCaptcha" to avoid conflicts with core and other developer's setting names.


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
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Custom Field for Portal LevelCustom Field for Portal Level


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