Posted by giorgio79 on June 15, 2011 at 2:33pm
2 followers
Jump to:
| Project: | Pollfield |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Issue Summary
What do you think?
We could get some nice charts like here
http://www.99polls.com/poll_80004
Comments
#1
I need some more information about what you'd like to see for this feature request.
Do you mean:
- 1. Ask the user where they're voting from?
- 2. Auto-detect it from their IP address?
- 3. Auto-detect is from their browser language settings?
If #2, then you're in luck. We already can collect IP addresses for anonymous voters in pollfield. You could use this information to lookup locations, with an external service. However, I don't think writing this lookup code into the core of pollfield is a great idea.
You could write an additional module or view that queried the pollfield data, did the hostname country lookup, and then displayed the graph.
I am a bit hesitant to write it into pollfield, since it adds complexity, and processing time. I am not familiar with how quick the country lookups are, but I am guessing they are slow enough that we wouldn't want to do it dynamically on node load. It might make more sense to do them at a cron job. Anyways, that's just my thoughts. Are you familiar with a good API for doing the geolocation lookups?
I've been thinking about more add-on functionality for pollfield, and how we might implement it without making the core module itself a cludge. Once we get some of the major bugs worked out of the system, it would be nice to have some optional add-on modules that come with the system that can add extra functionality like this. However, I don't think that work is a high priority until we can get a Drupal 7 version of the module developed.
#2
That is some great stuff Bryan, noticed we can store IP data for users.
Will try to look around for some geoip modules, for low volume stuff there is http://drupal.org/project/geoip
I guess we would need an additional field to store the country with the IP and use charts api to show some nice charts :) Lots of dependencies