1

I want to get the (lat $ Long) and country name of the visit users. For this I am using the Smart IP module but it will not show the full detail of the users.

Please help me out for this. How I get the whole data of the user?

enter image description here

PS: I need this info in the Drupal views for creating the conceptual filters.

0

Enable the Smart IP Views Bridge submodule of the Smart IP module. Here are some details about it, from its README.txt:

... exposes Smart IP visitor's location details to Views field (coordinates, country, ISO 3166 2-character country code, region, region code (FIPS), city and zip) and filter (country, ISO 3166 2-character country code, region, region code (FIPS), city and zip).

So with that submodule enabled, you should be able to create an appropriate view that uses such field/filter.

| improve this answer | |
  • This doesn't work in drupal 8. At least in their demo, – Tim Lieberman Nov 14 '17 at 19:07
0

To address your edit about the Views filter requirement, there's a submodule included with the main module, called "Smart IP Views Bridge". It has the functionality you're looking for. An extract from its README:

Smart IP Views Bridge exposes Smart IP visitor's location details to Views field (coordinates, country, ISO 3166 2-character country code, region, region code (FIPS), city and zip) and filter (country, ISO 3166 2-character country code, region, region code (FIPS), city and zip).

Enable that module and the filters you need will become available in Views.

The README goes on to provide full installation and configuration instructions for Views integration, so it's worth reading it thoroughly.

If solving programatically becomes a requirement:

It's right in the module description:

Other modules can use the function smart_ip_get_location($ip_address) in Drupal 6 and 7 and \Drupal\smart_ip\SmartIp::query($ipAddress) in Drupal 8 that returns an array containing the visitor's ISO 3166 2-character country code, longitude, latitude, region (FIPS), city and postal code.

| improve this answer | |
  • i need this info in the drupal views for creating the conceptual filters. – Karuna Apr 12 '17 at 7:35
  • There's a separate module included (smart_ip_views_bridge), its README has full instructions to set up such a View – Clive Apr 12 '17 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.