You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 305 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - I need a little help with a google map mod [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Blind-Summit
Sergeant
Sergeant


Joined: Jan 17, 2004
Posts: 110

Location: Norwich, England

PostPosted: Tue Jan 10, 2006 4:38 am Reply with quoteBack to top

Hi gang,

I have almost completed a google map addon that shows where your users are from.

I have 4 functions in my index file.
1 shows the member location
1 shows useful places
1 is a page where the user can click the map to setup his location
1 is some save code that outputs a sql statement.

In the user setup function SetupLocation() , i have created a form that contains the users point (latitude & longitude) I want this to call the SaveLocation() function and pass it the two variables - latitude and longitude

Here is my code from the relevent sections:

This is the function that collects the user's location:
Code:

REMOVED - Download my zip file instead


This is the savelocation function:

Code:

REMOVED - Download my zip file instead


When I submit the form, the URL trns to this:

Code:
http://www.blind-summit.co.uk/modules.php?func=save&latitude=74.01954331150227&longitude=-26.71875"


and gives a "sorry, this file doesn't exist.

If I try and get to the function by entering in this:

Code:
http://www.blind-summit.co.uk/modules.php?name=Member_Map&file=index&func=save


this works, but obviously needs the variables passed to it, so i try:

Code:
http://www.blind-summit.co.uk/modules.php?name=Member_Map&file=index&func=save&latitude=12&longitude=12


this again fails as the variables are not passed properly

Quote:
Warning: Missing argument 1 for savelocation() in /usr/local/psa/home/vhosts/blind-summit.co.uk/httpdocs/modules/Member_Map/index.php on line 471

Warning: Missing argument 2 for savelocation() in /usr/local/psa/home/vhosts/blind-summit.co.uk/httpdocs/modules/Member_Map/index.php on line 471


Could anyone please help with this. Is there a clean way for me to pick up the two variables and pass them into my save function?

_________________
[img]http://www.blind-summit.co.uk/sig.php[/img]

Last edited by Blind-Summit on Wed Mar 08, 2006 7:30 am; edited 1 time in total
Find all posts by Blind-SummitView user's profileSend private messageSend e-mailVisit poster's websiteAIM AddressYahoo MessengerMSN MessengerICQ Number
Blind-Summit
Sergeant
Sergeant


Joined: Jan 17, 2004
Posts: 110

Location: Norwich, England

PostPosted: Tue Jan 10, 2006 10:01 am Reply with quoteBack to top

Don't worry - this is all sorted out now.

if anyone has a similar problem, then just e-mail me for some help.

_________________
[img]http://www.blind-summit.co.uk/sig.php[/img]
Find all posts by Blind-SummitView user's profileSend private messageSend e-mailVisit poster's websiteAIM AddressYahoo MessengerMSN MessengerICQ Number
id01
Nuke Cadet
Nuke Cadet


Joined: Jan 18, 2006
Posts: 5


PostPosted: Wed Jan 18, 2006 7:15 pm Reply with quoteBack to top

I'm very interested in this mod as well. Please let me know what you have so far! Thanks!
Find all posts by id01View user's profileSend private message
Blind-Summit
Sergeant
Sergeant


Joined: Jan 17, 2004
Posts: 110

Location: Norwich, England

PostPosted: Fri Feb 24, 2006 6:13 am Reply with quoteBack to top

I have made a map that displays the user locations should they decide to add themselves to the map. I have also included a "useful locations" tab because i run a guitar website and I want to list guitar shops etc.

I also have a tab that lets the user create a marker for their location.

It's pretty basic as I have coded it directly for my site and not in any way a usable module for release. If I get enough interest I will try and make an admin section and some more useable options plus the installer / sql etc.

I have set it up for 2 other people as they pestered and also donated to my site. Just had to buy a second server to host media!!

So anyway - like I said, if there is enough interest, or if you just e-mail me

webmaster[at]blind-summit.co.uk I'll be open to requests perhaps Very Happy

_________________
[img]http://www.blind-summit.co.uk/sig.php[/img]
Find all posts by Blind-SummitView user's profileSend private messageSend e-mailVisit poster's websiteAIM AddressYahoo MessengerMSN MessengerICQ Number
siege911
Nuke Soldier
Nuke Soldier


Joined: Apr 23, 2004
Posts: 24


PostPosted: Thu Mar 02, 2006 7:04 pm Reply with quoteBack to top

I love this idea. You definitely should make a full mod out of this.
Find all posts by siege911View user's profileSend private message
njnightsky
Sergeant
Sergeant


Joined: Jun 04, 2004
Posts: 93


PostPosted: Fri Mar 03, 2006 5:05 am Reply with quoteBack to top

I use the frapper map

http://www.frappr.com/njnightsky

But a integrated one would be better.

_________________
NJ Night Sky
J&T Telescope
Chitika eMiniMalls - Make Money on your website
Find all posts by njnightskyView user's profileSend private message
Blind-Summit
Sergeant
Sergeant


Joined: Jan 17, 2004
Posts: 110

Location: Norwich, England

PostPosted: Mon Mar 06, 2006 7:43 am Reply with quoteBack to top

Hey guys

I've had a few more e-mails so today I started work on the map system. This will be my first ever module so it's pretty daunting.

I'm thinking of starting out with a simple module where people can simple view the map with a list of members, and then add / remove themselves.

I did start to work on an admin panel but this is a bit overkill. I'll finish it if there is demand for more features or a selection of pointers other than the users.

_________________
[img]http://www.blind-summit.co.uk/sig.php[/img]
Find all posts by Blind-SummitView user's profileSend private messageSend e-mailVisit poster's websiteAIM AddressYahoo MessengerMSN MessengerICQ Number
Blind-Summit
Sergeant
Sergeant


Joined: Jan 17, 2004
Posts: 110

Location: Norwich, England

PostPosted: Mon Mar 06, 2006 9:54 am Reply with quoteBack to top

Right - I have finished a simple version here: http://www.blind-summit.co.uk/modules.php?name=mapper

I have made this so that you can simple see the map. I removed the useful locations part as I have on my site because it was only for me to add guitar shops. It's easy enough to add something similar on if people want that.

I made this just for viewing as I don't want people to just sign up on my site to play with this. I will edit this post with a download location so you can try out the code. You need a google API key first.

_________________
[img]http://www.blind-summit.co.uk/sig.php[/img]
Find all posts by Blind-SummitView user's profileSend private messageSend e-mailVisit poster's websiteAIM AddressYahoo MessengerMSN MessengerICQ Number
njnightsky
Sergeant
Sergeant


Joined: Jun 04, 2004
Posts: 93


PostPosted: Mon Mar 06, 2006 10:22 am Reply with quoteBack to top

Looks good

_________________
NJ Night Sky
J&T Telescope
Chitika eMiniMalls - Make Money on your website
Find all posts by njnightskyView user's profileSend private message
Blind-Summit
Sergeant
Sergeant


Joined: Jan 17, 2004
Posts: 110

Location: Norwich, England

PostPosted: Mon Mar 06, 2006 10:37 am Reply with quoteBack to top

I don't really know what the proper way is to release stuff, but this is just for you to test.

[url]blind-summit-host.co.uk/downloads/map.zip[/url]

You need to add 2 colums to your nuke_users table called "user_latitude" and "user_longitude". I set mine to both varchar(20). You can add the colums with this SQL:

Code:

ALTER TABLE nuke_users
ADD (user_latitude varchar(20), user_longitude varchar(20));


Again, I think it may be best if I make a brand new table to handle the userid and map location - just to avoid adding stuff to this nuke_users table and also worrying about the nuke_ prefix.

Let me know what you think and any problems that arise

Alex

_________________
[img]http://www.blind-summit.co.uk/sig.php[/img]
Find all posts by Blind-SummitView user's profileSend private messageSend e-mailVisit poster's websiteAIM AddressYahoo MessengerMSN MessengerICQ Number
WhirlyGirl
Nuke Cadet
Nuke Cadet


Joined: May 13, 2005
Posts: 3


PostPosted: Thu Mar 16, 2006 11:13 am Reply with quoteBack to top

This is brilliant! Well done - I have been searching for months for a mod like this, and it works a treat!

Thank you blind!

WhirlyGirl Cool
Find all posts by WhirlyGirlView user's profileSend private message
WhirlyGirl
Nuke Cadet
Nuke Cadet


Joined: May 13, 2005
Posts: 3


PostPosted: Sat Mar 18, 2006 6:14 am Reply with quoteBack to top

Posting this becuase it might help somebody else out... yesterday my google map stopped working for no apparant reason. After hours of staring at code (as the errors were javascript ones) it dawned on me that someone had posted a pin, and they had some funny characters in their location. When it tried to bring back the pins it came across an illegal character and simply did not load.

Bit of a headache but I figured it out in the end. I am not really an expericed php coder, but I expect there's probably something you can include when bringing back the pins to strip the offending characters.

Just thought you might like to know this for future development.

Cheers,

WhirlyGirl Cool
Find all posts by WhirlyGirlView user's profileSend private message
njnightsky
Sergeant
Sergeant


Joined: Jun 04, 2004
Posts: 93


PostPosted: Sat Mar 18, 2006 6:24 am Reply with quoteBack to top

I decided to go the easy route on this and just put the frappr code in a module. You still have to go to frapper to add your pin but at least it looks better then always going offsite.

http://www.njnightsky.com/nuke/html/modules.php?name=MemberMap

_________________
NJ Night Sky
J&T Telescope
Chitika eMiniMalls - Make Money on your website
Find all posts by njnightskyView user's profileSend private message
kmatwill
Nuke Soldier
Nuke Soldier


Joined: Nov 03, 2005
Posts: 20


PostPosted: Sat Mar 18, 2006 9:15 am Reply with quoteBack to top

Would you mind sharing your module please?
Find all posts by kmatwillView user's profileSend private message
njnightsky
Sergeant
Sergeant


Joined: Jun 04, 2004
Posts: 93


PostPosted: Sat Mar 18, 2006 9:43 am Reply with quoteBack to top

Just make a html page with the frapper code. Add the page address to the $go_to_address1 in the IFrame

Save this code as index.php and add a Membermap folder in your Modules directory and add the index file.

Activate your module in your Modules admin and that's it.

It' just an Iframe Module

You can also change the height and width for your needs with the
width=\"660\" height=\"700\"



Code:
<?/************************************************************************//* PHP-NUKE: Advanced Content Management System                         *//* ============================================                         *//*                                                                      *//* Copyright (c) 2002 by Francisco Burzi                                *//* http://phpnuke.org                                                   *//*                                                                      *//* This program is free software. You can redistribute it and/or modify *//* it under the terms of the GNU General Public License as published by *//* the Free Software Foundation; either version 2 of the License.       *//*                                                                      *//************************************************************************//* This is a sample module for creating an IFrame Module                 *//* Change the $go_to_address1 to the URL you wish to display.            *//* Modify the height setting to closely match your html page size.       *//* Save this index file into a new folder of your module name.           *//************************************************************************/if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {  die ("You can't access this file directly...");}if(!IsSet($mainfile)) { include ("mainfile.php"); }$index=1;$go_to_address1="http://www.yoursite.com/membermap.htm";$go_to_address=rawurldecode($go_to_address1);include("header.php");OpenTable();echo "<iframe SRC=\"".$go_to_address."\" width=\"660\" height=\"700\" framespacing=0 frameborder=no border=0 scrolling=auto></iframe>";CloseTable();include("footer.php");die;?>
[code]

_________________
NJ Night Sky
J&T Telescope
Chitika eMiniMalls - Make Money on your website
Find all posts by njnightskyView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.129 Seconds - 427 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::