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...Location based on IP - Is the User IP address stored anywhere in 5.x?Location based on IP - Is the User IP address stored anywhere in 5.x?
Previous
 
Next
New Post
11/3/2009 8:25 AM
 

Another thing that I need is the Login and Register event hooks so that I can do this check whenever someone logins. It's working fine but it's a little inefficient (the user has to view his profile and if it's not filled in it will do so).

To see this feature in action, just create a new profile on PokerDIY.com and you'll notice you Country/Region/City have all been filled in already...


Entrepreneur

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

 
New Post
11/3/2009 2:18 PM
 

Well, Open Web Studio could probably do what you need with two modules.

One could simply grab the ip address of the user, look up it's geo data and log it into a session cookie.  The module can be "invisible" and placed on every page.  You can also set it so that it doesn't do the lookup if the cookie already has data, a way to save performance.

Second module could check if a user is logged in, if so it could lookup their profile data, if empty region then fill it in from the session cookie from the first module, and if already filled in then do nothing.  You could actually even set another cookie that states the region has been set in the profile already and give it a long term expiration date, again saving performance with quick transparent checks. 

It would all depend on users allowing cookies, but most will at least allow session cookies for session variables if you don't want to use regular cookies that can be stored long past the current session.  When I did the autologin module, I stored the data to a cookie that way the whole lookup could be avoided until the cookie expired a year from the initial login.

OWS has been used to create custom registration pages, too, but I have to tell you that what I've read in the forums that can be a tricky task.  But, at least there is a lot of info and I believe at least one example on how to do that.  You can seriously do almost anything, it's not just for custom forms, OWS is really amazing with tons of functions, if/then/else logic, can handle custom paging set at the database level, any query, and has security built in such as sql injection attack defenses, etc.  Don't hear much about it here, but the R2i guys are a group of exceptional professionals with an amazing open source module.  I still think ListX was a bit easier to learn, and switching to OWS pretty much brought me back to square one on the learning curve.  Still, it could handle what need.


JOHN GIESY
DotNetNuke Hosting Expert

DotNetNuke 7 Hosting $70 /year
DNN4Less.com Team DotNetNuke  

New Post
11/3/2009 2:38 PM
 

My question would be the basic premise of what you're trying to do.  How do you handle the fact that I have an address of Naples, FL with a zip of 34102 but I'm logging in on a system connected in Saratoga Springs, NY, zip 12866?  Especially when the connection goes through a proxy server in Virginia?

Jeff

 
New Post
11/3/2009 5:52 PM
 

Jeff Cochran wrote

My question would be the basic premise of what you're trying to do.  How do you handle the fact that I have an address of Naples, FL with a zip of 34102 but I'm logging in on a system connected in Saratoga Springs, NY, zip 12866?  Especially when the connection goes through a proxy server in Virginia?

I see you concerns, but bear in mind this is a halfway hack until either the core supports it again OR they provide event hooks for Login/Register so I can handle this better. Basically the pros outweigh the cons in my particular use-case.

The golden rule is never to change a user's location, only fill it in with a suggestion if it is missing. Worst case scenario is that a small % of users have the wrong location data which they can then edit (better than no data at all which renders the profile unusable on PokerDIY effectively).

PokerDIY is a location-based social network - it relies on user's city/country (nothing more detailed than that) - so if you have not filled these in then it will suggest it - it may get it wrong but you can easily change it. I would rather have it just suggest it when they go to the Edit Profile screen instead of this method but I do not want to edit the core.

Things like the poker map and the location search rely heavily on these fields. I also want to start doing more specific targetting like (I see you are from NY, here are some players you might like to meet and some games for you).

Of course, if they are using a proxy then it's going to get the country right but not the region/city perhaps, but if they are a serious user they can easily edit it.

 

 


Entrepreneur

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

 
New Post
11/3/2009 6:22 PM
 

Seems like every build of DNN5 contains a [LastIPAddress] column in the [Users] table, which gets updated on login.... I'm not sure if this exists in the DNN4 branch... 

HTH

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Location based on IP - Is the User IP address stored anywhere in 5.x?Location based on IP - Is the User IP address stored anywhere in 5.x?


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