Page 1 of 4

[ABD] User Map

Posted: Tue Dec 08, 2015 8:33 pm
by tas2580
Image

Extension Name: User Map
Author: tas2580

Extension Description:
Adds a map to the forum where users can enter her position.

Features
  • Open Street Maps or Google Maps as Map
  • Own marker for each group
  • Distance in miles or kilometres
  • Show distance to an user in topic view
  • Map in profile view
Extension Version: 0.1.1

Extension Demo: https://phpbb.tas2580.net/usermap/

Extension Download: https://tas2580.net/downloads/phpbb-usermap/

Github Repository: https://github.com/tas2580/usermap

Image

Re: [DEV] User Map

Posted: Tue Dec 08, 2015 9:45 pm
by Volksdevil
Thanks for doing this mate, appreciate it. :)

Can I suggest a small addition to the <div class="content"><div id="map" class="user_map olMap" style="position:relative;"> on the map page?

Small addition of: <div class="content">[color=#BF0040]<p>Click the Map to add or change your position.</p>[/color]<div id="map" class="user_map olMap" style="position:relative;">

And some small notices: I'm guessing you already know about these though, missing language VARS in the ACP for:
ACP_MAP_IN_VIEWPROFILE:
ACP_MAP_IN_VIEWPROFILE_EXPLAIN

ACP_DISTANCE_IN_VIEWTOPIC:
DISTANCE_IN_VIEWTOPIC_EXPLAIN

ACP_DISTANCE_FORMAT:
DISTANCE_FORMAT_EXPLAIN
And I think if you have chosen ACP_DISTANCE_IN_VIEWTOPIC and the user hasn't added coordinates, then the distance shouldn't show. Same in viewprofile? I hope that makes sense. It's great as it is, but just small suggestions.

Re: [DEV] User Map

Posted: Tue Dec 08, 2015 11:48 pm
by tas2580
Yes I know about the missing language variables. I will add them later because at now I change to much and I don't want to translate it on every change. But if you want to help, you are welcome to send pull requests ;)

I have now added a message for all users with the right to add and not added yet. Also I have optimized the permissions for anonymous user.

Re: [DEV] User Map

Posted: Wed Dec 09, 2015 2:36 pm
by Volksdevil
Loving the new AJAX stuff. 8-)

Just noticed that if I administer a users profile, they suddenly appear on the Map. It seems that once administered, their coordinates are set to: Longitude:0 and Latitude: 0. So there's no way to stop them appearing on the Map.

Re: [DEV] User Map

Posted: Thu Dec 10, 2015 12:22 am
by tas2580
Update to 0.1.1:

Fixed Bugs
Added Touchscreen support for markers

Re: [DEV] User Map

Posted: Thu Dec 10, 2015 12:58 am
by Volksdevil
Error in googles inspector when viewing a users profile:
Uncaught TypeError: returndata.forEach is not a function
The marker doesn't show on the map when viewing a users profile, so maybe something to do with that. :) I wish I could help with coding, but all I can do is test :oops:

Re: [DEV] User Map

Posted: Thu Dec 10, 2015 3:20 am
by tas2580
Volksdevil wrote:Error in googles inspector when viewing a users profile
I know, it's because of the new marker ajax loading JavaScript. I will fix it, but first I need to optimize some things in JavaScript, maybe I will remove the map from the users profile, because it makes some problems.
Volksdevil wrote:I wish I could help with coding, but all I can do is test
Testing is great, because testing costs a lot of time for me. Also I use my software like I think that users will use it. But the interesting point is what happens if someone use it in a different way.

So test it, report bugs and new feature suggestions. That's big help for me.

Also if you want, you can help to translate it because my english is not good and so my english language files are often bad.

Re: [DEV] User Map

Posted: Thu Dec 10, 2015 6:08 pm
by Fast_Eddie
Pretty cool extension that I would use! :) Is there a way you could have the option to hide or make private your location, but still show the distance?

Re: [DEV] User Map

Posted: Thu Dec 10, 2015 6:19 pm
by tas2580
Fast_Eddie wrote:Is there a way you could have the option to hide or make private your location, but still show the distance?
I have set it on my ToDo.

Re: [DEV] User Map

Posted: Thu Dec 10, 2015 8:24 pm
by cece74
Beautiful extension, congratulations! I follow with interest.

Re: [DEV] User Map

Posted: Thu Dec 10, 2015 8:48 pm
by lopoto
Cool staff :mrgreen: thx.

Re: [DEV] User Map

Posted: Thu Dec 10, 2015 8:51 pm
by neckflo
Great Jop!

May is it possible that the user can register with plz on the main board registration?
That will be awesome!

Re: [DEV] User Map

Posted: Thu Dec 10, 2015 10:06 pm
by Volksdevil
neckflo wrote:Great Jop!

May is it possible that the user can register with plz on the main board registration?
That will be awesome!
So many cool ways this extension could potentially go. 8-) I initially wanted it for a map of specific users (Only users that have filled a certain CPF) but I feel that is probably a little too much to ask now that DEV has come this far.

EDIT: Whoops, language correction sorry. And yes I'm happy to help with English translation :)

In language/en/permissions_usermap.php
'ACL_U_USERMAP_ADD' => 'Can subscribe to the user map',

Should be:
'ACL_U_USERMAP_ADD' => 'Can add themselves to the user map',

Re: [DEV] User Map

Posted: Fri Dec 11, 2015 1:23 am
by tas2580
Update to 0.1.2:
Fast_Eddie wrote:Is there a way you could have the option to hide or make private your location, but still show the distance?
Is now possible with a new right.
neckflo wrote:May is it possible that the user can register with plz on the main board registration?
I think it would be a little bit inaccurate and you have a lot of markers on same position. But I think about how to make it possible that a user can enter his location on register without knowing his coordinates. Maybe a small map or something like this.
Volksdevil wrote:Whoops, language correction sorry.
Thanks, it's fixed.

Re: [DEV] User Map

Posted: Fri Dec 11, 2015 1:48 am
by lopoto
after am download 0.1.2 and repack , show 0.1.1 ;)