The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Clickable user location using google maps Details »» | |||||||||||||||||||||||||||
Clickable user location using google maps
Developer Last Online: Jun 2013
Introduction:
Have you ever wondered where Orange, CA was? Well now you can click on a users location and it'll bring it up in a new window via google maps. Hack Requirements: None Original Version 1.0 Installation: Find Code:
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if> Code:
<if condition="$post['field2']"><div>$vbphrase[location_perm]: <a href="http://maps.google.com/maps?f=q&hl=en&q=$post[field2]" title="Find $post[username] on Google Maps!" target="_blank">$post[field2]</a></div></if> I've changed it from the complete location being a link, to an image of a globe before their location. The globe is now the link, it's a much cleaner install Upgrade instructions: FIND in your postbit, or postbit_legacy Code:
<if condition="$post['field2']"><div>$vbphrase[location_perm]: <a href="http://maps.google.com/maps?f=q&hl=en&q=$post[field2]" title="Find $post[username] on Google Maps!" target="_blank">$post[field2]</a></div></if> Code:
<if condition="$post['field2']"> <div>$vbphrase[location_perm]: <a href="http://maps.google.com/maps?f=q&hl=en&q=$post[field2]" title="Find $post[username] on Google Maps!" target="_blank"><img class="inlineimg" src="images/globe.gif" alt="Find $post[username] on Google Maps!" border="0" /></a> $post[field2] </div></if> Fresh install of new version FIND in your postbit, or postbit_legacy Code:
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if> Code:
<if condition="$post['field2']"> <div>$vbphrase[location_perm]: <a href="http://maps.google.com/maps?f=q&hl=en&q=$post[field2]" title="Find $post[username] on Google Maps!" target="_blank"><img class="inlineimg" src="images/globe.gif" alt="Find $post[username] on Google Maps!" border="0" /></a> $post[field2] </div></if> Demo: 4x4Mecca.com Show Your Support
|
Comments |
#12
|
|||
|
|||
Hi guys,
I noticed that this mod is not supported. It would be perfect for my forum. Are there any problems that have occurred in installations at all? If anyone could give me a bit more info that would be great with regards to the safety of installing an unsupported mod as i am new to VBulletin. Many thanks |
#13
|
||||
|
||||
Quote:
And it works fabulously - I like it very much Jacquii. |
#14
|
|||
|
|||
I just love this simple modification!! Thanks a lot 4x4 Mecca
I would also like to use this on my MEMBERINFO page, but this seems a little more complicated. Any adea how I could achieve that? Oh, and one minor thing: better to use $vbphrase[location_perm]: in stead of Location: in your template mod. |
#15
|
|||
|
|||
An issue I'm having is that it's not parsing the spaces as %20 so when it tries to link it links to:
http://maps.google.com/maps?f=q&hl=en&q=gun lake, MI Instead of: http://maps.google.com/maps?f=q&hl=e...n%20lake,%20MI |
#16
|
|||
|
|||
Quote:
|
#17
|
|||
|
|||
Quote:
|
#18
|
||||
|
||||
I tried this on my new forum I am making... I live in Washington, PA but the google map shows up wrong..
It gives this URL: http://maps.google.com/maps?f=q&hl=en&q=Washington, PA When I am over here: http://maps.google.com/maps?f=q&hl=e...gton,+PA+15301 |
#19
|
|||
|
|||
If anyone is having trouble, and wants me to help, I would need admin access to test edit the template. PM me if you have created an account and I'll see if I can fix it.
|
#20
|
||||
|
||||
Its not a bug in your script, its because in Pennsylvania theres a few dozen "Washington's" it just picks the wrong one unless I include the zip code....
|
#21
|
|||
|
|||
I thought it had to do with the field2 being in quotes, not apostrophe's, like this
OLD CODE Code:
<if condition="$post['field2']"> <div>$vbphrase[location_perm]: <a href="http://maps.google.com/maps?f=q&hl=en&q=$post[field2]" title="Find $post[username] on Google Maps!" target="_blank"><img class="inlineimg" src="images/globe.gif" alt="Find $post[username] on Google Maps!" border="0" /></a> $post[field2] </div></if> Code:
<if condition='$post['field2']'> <div>$vbphrase[location_perm]: <a href='http://maps.google.com/maps?f=q&hl=en&q=$post[field2]' title='Find $post[username] on Google Maps!' target='_blank'><img class='inlineimg' src='images/globe.gif' alt='Find $post[username] on Google Maps!' border='0' /></a> $post[field2] </div></if> I searched google maps for http://maps.google.com/maps?f=q&hl=en&q=Washington+pa and it shows up |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|