Does IP Geolocation have tokens available or can I use the smart_ip tokens?

I see that smart ip has the following tokens available:

Smart IP Tokens related to Smart IP geolocation info
City [smart_ip:city] Smart IP City
Country [smart_ip:country] Smart IP Country
Country code [smart_ip:country_code] Smart IP Country code
Latitude [smart_ip:latitude] Smart IP Latitude
Locality [smart_ip:locality] Smart IP Locality
Longitude [smart_ip:longitude] Smart IP Longitude
Postal code [smart_ip:postal_code] Smart IP Postal code
Region [smart_ip:region] Smart IP Region
Region code [smart_ip:region_code] Smart IP Region code

CommentFileSizeAuthor
#8 visitor-location tokens.png294.94 KBRdeBoer
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RdeBoer’s picture

Hi SocialNicheGuru,
There is no code in the module to specifically enable or disable tokens from other modules.
Where did you want to use them?
You should be able to use code snippets in many cases:

   $location = ip_geolocation_get_visitor_location();
   echo $location['locality'];
SocialNicheGuru’s picture

modules like yelp use tokens from other modules like smart_ip to identify the location.

It would be nice to have tokens available. I wonder if the smart_ip token code could be used?

RdeBoer’s picture

Title: Is there token module integration? » Expose location tokens to other modules.
Category: support » feature

Yes I guess smart_ip code could serve as a base. Or any other module using tokens. Token code is pretty standard.
If there is a great need for this feature I will consider adding it.

Yelp at this stage has fewer than 40 D7 installs.

SocialNicheGuru’s picture

id love to place user location in panel or in a page title to help with SEO.

SocialNicheGuru’s picture

there is a separate address token module. Maybe something like this:
http://drupal.org/project/addressfield_tokens

RdeBoer’s picture

Status: Active » Postponed

Tokens aren't a bad idea. Just don't have the time.
Patches anyone?
Rik

robertwb’s picture

Issue summary: View changes

Are you still looking at this @RdeBoer? If so, I'm getting ready to do a little geolocation stuff.

RdeBoer’s picture

Title: Expose location tokens to other modules. » Expose visitor location tokens to other modules.
Assigned: Unassigned » RdeBoer
Status: Postponed » Fixed
FileSize
294.94 KB

I couldn't sleep, so added it. Tokens are exposed under the heading "Visitor tokens".

The screenshot shows how the tokens expose themselves, in this case on the Webform Form Settings page, e.g., node/123/webform/configure, after you've clicked "Browse available tokens".

Available now in IPGV&M 7.x-1.x-dev and in the upcoming official release 7.x-1.27

robertwb’s picture

This is fantastic @RDeBoer !!! Testing today!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.