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...Displaying Address/Location in a custom moduleDisplaying Address/Location in a custom module
Previous
 
Next
New Post
10/12/2006 3:35 PM
 
Hello,

I am working on a module that has a location, and was wondering what the most standard way of implementing this is.

I noticed there is an Address.vb class (mentioned in the Module Dev Guide) that handles Street, Country etc. I think this would be a good place to start? I was just wondering if the new profile stuff uses this control as you can set fields to be invisible (eg. "unit") - or is it handcoded in the core profile code? I also noticed a CountryList class that looks interesting.

I would like to make this as standard as possible so that I can keep up with any changes (maybe integration with the core mapping module at some point) - has anyone got any advice on the best way of using this in a module?

I was going to have a Country list that read off the core Country List and store that as a CountryID in my module table, and store the rest of the fields (street, city etc) as NVARCHARS...


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
10/12/2006 4:26 PM
 
Quick Update: The Address UserControl seems to be the way forward, but I am unsure of the column sizes for Country/Region etc (or do I store Country as an ID?) A quick scan over the core store procs did not reveal anything as these values are now stored in the non-normalised profile properties - I checked an older version of DNN but no luck either - any ideas on col sizes? Whats standard these days?



Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
10/12/2006 6:25 PM
 
this is what i did:

                Dim country As String = objPPUser.Profile.Country
                If country = "United States" Then
                    country = String.Empty

                    Dim objCityInfo As OTBRadio.User.Entities.CityInfo = UserBase.GetCityByZipCode(CInt(objPPUser.Profile.PostalCode))

                    If objCityInfo Is Nothing Then
                        lblLocation.Text = "Not a valid zipcode"
                    Else
                        lblLocation.Text = objCityInfo.City & ", " & objCityInfo.StateAbbr
                    End If

                Else
                    lblLocation.Text = objPPUser.Profile.City & ", " & objPPUser.Profile.Region & country
                End If


 
New Post
10/13/2006 6:37 AM
 
Thanks for that - the Address control seems quite smart (changes Postcode/ZIP label based on country).

For the record, the max lengths on the control are:

Street - 50
City - 50
Country - DDL
Region - 50
PostCode - 50

Country also seems to have been implemented as a string, not an INT (I thought it would store the List value ID)

Hope this helps someone...

Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Displaying Address/Location in a custom moduleDisplaying Address/Location in a custom module


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