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 ...Default Country in RegistrationDefault Country in Registration
Previous
 
Next
New Post
1/2/2008 1:47 PM
 

James,

It's not your installation.  I have also been looking for a way to do this.  The closes I have found is to move "US" to the top of the list.  See below if interested...

www.dotnetnuke.com/Community/Forums/tabid/795/forumid/118/threadid/177740/scope/posts/Default.aspx

Chuck R.

 
New Post
1/3/2008 10:08 AM
 

Thanks Chuck for replying I didn't think anyone was going to. I really don't understand why goblank's solution will not work, after all what exactly is the purpose of the default value in profile properties? It would be nice is someone in the Core Team could explain to us why this does not work or at least explain the function of default value.

Thanks
James

 
New Post
1/7/2008 10:30 AM
 

For whatever reason, the GeoIP pull doesn't work for any site I have ever deployed.  It just doesn't look up the IP address.  I think dropping that function makes a lot of sense.

In the meantime, I have done the following to hack a solution.  If the GEOIP doesn't resolve to a country, this fix uses the default setting of the portal under User Accounts->Manage Profile Properties. To make the change requires a Core recompile. Editing file Components->Users->UserModuleBase.vb I have made the following chagnes starting at line 512:

Old Code:
'Set default countr
Dim country As String = Null.NullString
country = LookupCountry()
If country <> "" Then
newUser.Profile.Country = country
End If

New Code:

'Set default countr
Dim country As String = Null.NullString
country = LookupCountry()
If country <> "" And country <> "N/A" Then
newUser.Profile.Country = country
Else
newUser.Profile.Country = DotNetNuke.Entities.ProfileProfileController.GetPropertyDefinitionByName(PortalId, "Country").DefaultValue
End If 

One problem I am still having is that the "Region" label isn't updateing to show "State" when using the United States as the default.  Does anyone have a better suggestion?

 


Eric Shafer
Houston Web Designer
Click and Create

281-206-2631
 
New Post
3/4/2008 7:27 PM
 

Here is a work around using Javascript, it only changes the Country to United States if no country has been selected.

1. Create a Custom Container called RegistrationOnly.ascx
2. Setup a default  "Users Page" in the Admin Settings so that we get the same page everytime a user clicks Register.
3. On that page use your Custom Container.
4. Add the following Javascript to the bottom of the RegistrationOnly.ascx in a script tag.

var myDropDownCountryBoxName = 'UniqueNameOfYourCountryDropDownBox'
var ddlCountry = document.getElementsByName(myDropDownCountryBoxName);
if (ddlCountry){if (ddlCountry[0]){if (ddlCountry[0].selectedIndex==0){ddlCountry[0].selectedIndex=1;}}}

Note: I moved United States to index 1 in my Database, but you can also use selectedValue='United States' 
Make sure you set the myDropDownCountryBoxName variable.

Brad

 
New Post
3/7/2013 2:02 PM
 
I know I'm years later - but my client just requested this - since we don't use popups in the site this needed to be modified into - I was able to add the following to the skin file. If it's not found - no harm no foul - assumes jQuery is loaded on the page




Andrew Walker

Learn to make your own beer and wine at homeIf you enjoy making your own beer and/or wine - be sure to check out http://www.ForemostBrewing.com
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Default Country in RegistrationDefault Country in Registration


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