Author |
Message |
Blind-Summit
Sergeant


Joined: Jan 17, 2004
Posts: 110
Location: Norwich, England
|
Posted:
Tue Jan 10, 2006 4:38 am |
  |
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 |
|
         |
 |
Blind-Summit
Sergeant


Joined: Jan 17, 2004
Posts: 110
Location: Norwich, England
|
Posted:
Tue Jan 10, 2006 10:01 am |
  |
|
         |
 |
id01
Nuke Cadet


Joined: Jan 18, 2006
Posts: 5
|
Posted:
Wed Jan 18, 2006 7:15 pm |
  |
I'm very interested in this mod as well. Please let me know what you have so far! Thanks! |
|
|
   |
 |
Blind-Summit
Sergeant


Joined: Jan 17, 2004
Posts: 110
Location: Norwich, England
|
Posted:
Fri Feb 24, 2006 6:13 am |
  |
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  |
_________________ [img]http://www.blind-summit.co.uk/sig.php[/img] |
|
         |
 |
siege911
Nuke Soldier


Joined: Apr 23, 2004
Posts: 24
|
Posted:
Thu Mar 02, 2006 7:04 pm |
  |
I love this idea. You definitely should make a full mod out of this. |
|
|
   |
 |
njnightsky
Sergeant


Joined: Jun 04, 2004
Posts: 93
|
Posted:
Fri Mar 03, 2006 5:05 am |
  |
|
   |
 |
Blind-Summit
Sergeant


Joined: Jan 17, 2004
Posts: 110
Location: Norwich, England
|
Posted:
Mon Mar 06, 2006 7:43 am |
  |
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] |
|
         |
 |
Blind-Summit
Sergeant


Joined: Jan 17, 2004
Posts: 110
Location: Norwich, England
|
Posted:
Mon Mar 06, 2006 9:54 am |
  |
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] |
|
         |
 |
njnightsky
Sergeant


Joined: Jun 04, 2004
Posts: 93
|
Posted:
Mon Mar 06, 2006 10:22 am |
  |
|
   |
 |
Blind-Summit
Sergeant


Joined: Jan 17, 2004
Posts: 110
Location: Norwich, England
|
Posted:
Mon Mar 06, 2006 10:37 am |
  |
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] |
|
         |
 |
WhirlyGirl
Nuke Cadet


Joined: May 13, 2005
Posts: 3
|
Posted:
Thu Mar 16, 2006 11:13 am |
  |
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  |
|
|
   |
 |
WhirlyGirl
Nuke Cadet


Joined: May 13, 2005
Posts: 3
|
Posted:
Sat Mar 18, 2006 6:14 am |
  |
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  |
|
|
   |
 |
njnightsky
Sergeant


Joined: Jun 04, 2004
Posts: 93
|
Posted:
Sat Mar 18, 2006 6:24 am |
  |
|
   |
 |
kmatwill
Nuke Soldier


Joined: Nov 03, 2005
Posts: 20
|
Posted:
Sat Mar 18, 2006 9:15 am |
  |
Would you mind sharing your module please? |
|
|
   |
 |
njnightsky
Sergeant


Joined: Jun 04, 2004
Posts: 93
|
Posted:
Sat Mar 18, 2006 9:43 am |
  |
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 |
|
   |
 |
|