PDA

View Full Version : Google Map - MOD


CyberGrenade
07-09-2006, 05:28 AM
I have added a mod that will display the google map associated with a link based on where the server for that domain is hosted. I think it is kinda cool. It uses two different APIs to generate the code, so it does take some time to load it. That is why I have added the page as a link details page instead of adding it to the links.tpl.

Here is the code, and how to install it. As always, if you find this useful, please add your site to my directory http://www.cybergrenade.com

Here is a URL of an example:
http://www.cybergrenade.com/linkinfo.php?s=1

First - Get an API keycode from Google Maps.
http://www.google.com/apis/maps/signup.html

Second - Create the code page.

Copy the code below and add it to your root directory as a file called linkinfo.php

Content visible to registered users only.

Third - Create the template page. Create a page called linkinfo.tpl with the code below and add it to your templates directory.

Content visible to registered users only.

Forth - Add your Google MAP API code to the linkinfo.tpl page.

Replace this code with the key Google gave you for your site.
Content visible to registered users only.

Fifth - Modify your link.tpl page so that after the link title, you have an icon or a word loads the info or details page.

This is the code that I use.
Content visible to registered users only.

The graphic I use, was downloaded from this site:
http://www.ndesign-studio.com/resources/pixel_icons.htm

I have also added a visitor map to my site that uses the Google API. You can see it by going to: http://www.cybergrenade.com/map.php

I need to clean up the code and optimize it before I upload it here.

As always, if you find this information or mod useful, please add your site to my directory as a Reciprocal Link, Featured Link, or Regular Link.

Thanks......

proprod
07-10-2006, 07:06 AM
Nice mod! Already in use... modded to fit me site of course, hehe... let me know your address for a donation!

arindra
07-10-2006, 08:07 AM
nice , if i am not wrong , i had noticed Optimit had Google map mod as well

regg
07-13-2006, 03:17 PM
is it for 3.05 ?

mgrohan
07-13-2006, 03:51 PM
Hi, Firstly thanks for the mod, it looks great!

Although upon running it i am getting the following error message on trying to open the linkinfo page
"Fatal error: Call to a member function on a non-object in /home/xxxxx/public_html/linkinfo.php on line 13"

Upon deleting that line [$row2 = $rs->FetchRow();] it appears to be working? is this likely to cause any problems removing this line?

simes
08-08-2006, 10:09 AM
This is a great mod, is it possible for the map to display without the user having to click on the button?

simes
08-11-2006, 01:21 PM
Well I figured it out :D

jahangirafzal
08-14-2006, 11:49 PM
thanks for the mod

islandinthesun
01-30-2007, 08:11 PM
Hi,

This is a great mod but I'm very new to phpLD and have no idea where to put the code on step 5. Please could someone help me?

Thanks :)

sevenich
04-06-2007, 07:32 PM
hi,

this mod is fine,

but...

i canīt get the users location info from hostip.info.

can anybody help me?

thanks..

rebel
04-06-2007, 09:14 PM
lovely mod, thank you for sharing it
(http://www.phplinkdirectory.com/forum/member.php?u=1923)

shadav
04-30-2007, 07:06 PM
very nice mod...but i need a bit of help....installed on v3.2 but the info won't display...also anyway to include it in the details.tpl instead of on it's own i'm assuming Content visible to registered users only. would work?

but first things first lol getting it to work :)
http://www.shadav.info/linkinfo.php?s=3446
http://www.shadav.info/detail/link-3446.html

[edit] nevermind i got it to work lol....didn't copy the code completely :D

shadav
04-30-2007, 07:20 PM
ok well...i do need help lol...any idea on how to make it display on the details.tpl?

{non working demo/test link removed}
the info's blank....

aureldragut
05-19-2007, 02:22 PM
I got the same blank.

shotoshi
10-31-2007, 11:28 AM
Yeah, good mod but I'm not interested where the server is based. If I listed my website in a directory using this mod it would show my server based in the U.S. but me and my business are based in the U.K. - England to be precise.

What would be really cool, especially for address listings of local businesses, would be a Google Map mod which locates them according to the post code (zip code) they entered when setting up their listing.

Now, if someone could develop this, I would not only vote for it but actually part with some cash.

James
10-31-2007, 04:53 PM
If you have the fields added I can get you going. The code already exists and is in use on a few directories already. If you are adding fields add 2 more one for street address and one for the town , state(or what it is called there)

shotoshi
10-31-2007, 08:46 PM
Dawzz, cheers for that. I did some searching and found that some people are already doing it. When I get around to starting my project I may come knocking ;-)