[RC] Map BBCode

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Get Involved
Zverik
Registered User
Posts: 16
Joined: Tue Oct 08, 2013 8:02 pm
Location: Saint-Petersburg, Russia
Name: Ilya Zverev
Contact:

[RC] Map BBCode

Post by Zverik » Wed Oct 16, 2013 5:36 am

Modification Name: MapBBCode
Author: Zverik

Modification Description:: Maps for your forum. Adds a [map] bbcode, which renders a map either empty or with user-drawn objects on it. With this MOD users can share routes and generally show where the thing discussed is located.
Modification Version:: 1.0.2

Features:
  • Tested on phpBB 3.0.8, .10 and .12
  • Simple installation process with AutoMOD and UMIL
  • Supports both prosilver and subsilver2 styles
  • The BBCode is universal, in future interoperable with other forums and CMS
  • Full-featured map editor allows drawing annotated markers, coloured lines, polygons
  • Most features are configured from a nice-looking administration panel
  • Integration with Board3 Portal, works well with KISS Portal Engine
  • Underlying javascript library works on most browsers (including IE8)
  • Integration with http://share.mapbbcode.org
  • All parts of the MOD (including most map layers) are open-source with no fees or ads
Screenshots: administration panel
Demo: The library underneath the MOD is showcased at http://mapbbcode.org. It requires no registration.
GitHub Repository: MapBBCode/mapbb-phpbb3

Modification Download: https://github.com/MapBBCode/mapbb-phpb ... de_mod.zip
Last edited by Zverik on Fri Dec 27, 2013 3:10 pm, edited 4 times in total.

leschek
Registered User
Posts: 755
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [BETA] Map BBCode

Post by leschek » Thu Oct 17, 2013 10:49 am

I tried to install it on phpBB 3.0.11 (installed with QuickInstall tool) and got this error:

Code: Select all

[phpBB Debug] PHP Notice: in file [ROOT]/install_mapbbcode.php on line 139: Undefined variable: row_exists
When I click under Posting tab on Map BBCode I see this:

Code: Select all

[phpBB Debug] PHP Notice: in file [ROOT]/includes/acp/acp_mapbbcode.php on line 93: Undefined variable: jab_host

Zverik
Registered User
Posts: 16
Joined: Tue Oct 08, 2013 8:02 pm
Location: Saint-Petersburg, Russia
Name: Ilya Zverev
Contact:

Re: [BETA] Map BBCode

Post by Zverik » Thu Oct 17, 2013 5:40 pm

leschek wrote:I tried to install it on phpBB 3.0.11 (installed with QuickInstall tool) and got this error:
...
Oh. This is a bit embarassing. I've enabled phpBB debug and fixed all PHP notices. Thanks for pointing that out.

leschek
Registered User
Posts: 755
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [BETA] Map BBCode

Post by leschek » Thu Oct 17, 2013 7:22 pm

Thank you. I was able to install the fixed version.
But it seems that I have problem with ACP. On the top (blue) bar of the browser I see ACP_MAPBBCODE - it looks like there is missing language variable and ACP itself looks slightly different than on your screenshot:

Image

Zverik
Registered User
Posts: 16
Joined: Tue Oct 08, 2013 8:02 pm
Location: Saint-Petersburg, Russia
Name: Ilya Zverev
Contact:

Re: [BETA] Map BBCode

Post by Zverik » Thu Oct 17, 2013 8:35 pm

leschek wrote:Thank you. I was able to install the fixed version.
But it seems that I have problem with ACP. On the top (blue) bar of the browser I see ACP_MAPBBCODE - it looks like there is missing language variable and ACP itself looks slightly different than on your screenshot
I have fixed the title, thanks. And it turned out I have placed the javascript library inside a protected path. Now I've moved it to another place. Try reinstalling the MOD now.

leschek
Registered User
Posts: 755
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [BETA] Map BBCode

Post by leschek » Thu Oct 17, 2013 9:43 pm

Thanks for the fast fix. It works now and it is really nice. I will test it a bit and will send feedback later if you don't mind.

Zverik
Registered User
Posts: 16
Joined: Tue Oct 08, 2013 8:02 pm
Location: Saint-Petersburg, Russia
Name: Ilya Zverev
Contact:

Re: [BETA] Map BBCode

Post by Zverik » Wed Oct 30, 2013 6:51 am

I have just updated the MOD. It has been tested on 3.0.8, .10 and .12. Fixes:
  • Integration with http://share.mapbbcode.org. Now uer can collaborate on creating a map, and included external maps can be downloaded as GPX or CSV. Users can upload a map right from the editing window.
  • Multiple fixes for IE8
  • Markers with text of moderate length do not require clicking now, text is displayed on the map
  • Confirmation on form submit when editor opens in an inline panel
Since it's in beta and not many people have installed it, I decided not to bother with versions (there is a new bbcode, [mapid], and duplicating code is not fun). So if you have installed the plugin, you would need to uninstall it first. Note that this is still in beta. I plan on moving it to RC after somebody tests the MOD.

Zverik
Registered User
Posts: 16
Joined: Tue Oct 08, 2013 8:02 pm
Location: Saint-Petersburg, Russia
Name: Ilya Zverev
Contact:

Re: [BETA] Map BBCode

Post by Zverik » Fri Nov 01, 2013 9:50 am

I've updated the plugin once again, and apart from fixing tiny bugs, I guess I should start updating version numbers next time. Updates:
  • Translations are now shared with the library, no need to do translation work twice
  • Board3 Portal support: maps in blocks on the portal page
I failed to understand how to integrate this module with Advanced BBCode Box, which seems to be very popular, and would be glad if someone does that. If that is at all needed.

leschek
Registered User
Posts: 755
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [BETA] Map BBCode

Post by leschek » Fri Nov 01, 2013 6:16 pm

I tested it bit and I have to say it's nice addition to forum. I installed without problem on phpBB 3.0.11 (on localhost).

It's very easy to add map to the post and I like that I can add more points to the one map in one post. Before your MOD I tested phpBB Geo Topics MOD and there was possible to add only one point for one post.

1. I would like to know if would be possible to add Google maps (I think they are most used maps today) and another map servers (in my country we use mostly http://www.mapy.cz).

2. Would be possible to upload to the map data from GPS tracker ? I created for my forum BBCode for Google maps and was able to add track through Google maps (link to post where I used it), but it would be much easier if in your MOD is such option.

3. I like some features of phpBB Geo Topics MOD (link above) - option to have different zoom and coordinates settings for each forum, user maps, option to have all topic map points in one map on the top of topic. Basically (from my point of view) I would like to use options from both of the MODs and it would be great if they can work together or if you developers can merge both MODs and make one awesome Map MOD.

Zverik
Registered User
Posts: 16
Joined: Tue Oct 08, 2013 8:02 pm
Location: Saint-Petersburg, Russia
Name: Ilya Zverev
Contact:

Re: [BETA] Map BBCode

Post by Zverik » Sat Nov 02, 2013 7:22 am

leschek wrote:1. I would like to know if would be possible to add Google maps (I think they are most used maps today) and another map servers (in my country we use mostly http://www.mapy.cz).
Using Google Maps is frowned upon (because they are evil and everyone should promote free and open maps that anyone can edit, OpenStreetMap), but it is possible to add them to the forum. You would have to download a script and edit adm/styles/acp_mapbbcode.html and styles/*/template/mapbbcode_scripts.html (in the latest version of the MOD, otherwise overall_header.html and simple_header.html), see instructions at the end of this FAQ.

As for mapy.cz, it is possible in theory, but I don't know how. You can try open alternatives, like included "CycleMap" and "Outdoors", or http://mtbmap.cz:

Code: Select all

window.layerList.list['MTBMap.cz'] = 'L.tileLayer("http://tile.mtbmap.cz/mtbmap_tiles/{z}/{x}/{y}.png", { attribution: "Maps © OSM | Tiles © Martin Tesař" })';
leschek wrote:2. Would be possible to upload to the map data from GPS tracker?
Yes, but not directly. Head to http://share.mapbbcode.org and import you trace there (it supports GPX, NMEA, CSV and PLT). Then either press "Edit Raw" and copy the code to your post, or save the map, open map editor in forum, press "Upload" (if you have enabled external maps) and paste "link for sharing" in the URL field (or just type [mapid]id[/mapid] by hand, where id is a 5-letter identifier of the saved map). The advantage of using an external link is that there will be "Export" button, which allows for downloading the trace in many formats.
leschek wrote:3. I like some features of phpBB Geo Topics MOD (link above) - option to have different zoom and coordinates settings for each forum, user maps, option to have all topic map points in one map on the top of topic. Basically (from my point of view) I would like to use options from both of the MODs and it would be great if they can work together or if you developers can merge both MODs and make one awesome Map MOD.
The thing is, I didn't intend to create one-stop shop for everything maps. My module does one thing, and does it well: it allows users to illustrate their posts with maps. It doesn't concern itself with forum structure, aggregating information and such. This way it can be ported not only to other forums, but also to blogs and wiki engines. GeoTopics MOD is a completely different (and sadly, bloated) plugin: its purpose is to place topics and threads on a map. Not illustrate posts, not for users to draw things on a map, but for aggregation of locations of forum threads and displaying them on a map. That's why its mapping abilities are so thin. And it cannot decide on a simple mapping API, so I don't even know how much megabytes of data it loads on every page.

There is absolutely no way mine and that modifications can be merged. Mostly because those are different MODs for different tasks.

leschek
Registered User
Posts: 755
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [BETA] Map BBCode

Post by leschek » Sun Nov 03, 2013 4:26 pm

OK. Thank you for explanation.
I'm trying now to add Google maps, but have problem with this part:
mapbbcode FAQ wrote:...Then add those lines after mapbbcode-config.js but before new MapBBCode():...
There is not mentioned file I should put those lines in (I tried to search for new MapBBCode() in all files in forum (with notepad ++), but I couldn't find it)

Zverik
Registered User
Posts: 16
Joined: Tue Oct 08, 2013 8:02 pm
Location: Saint-Petersburg, Russia
Name: Ilya Zverev
Contact:

Re: [BETA] Map BBCode

Post by Zverik » Sun Nov 03, 2013 5:18 pm

leschek wrote:OK. Thank you for explanation.
I'm trying now to add Google maps, but have problem with this part:
mapbbcode FAQ wrote:...Then add those lines after mapbbcode-config.js but before new MapBBCode():...
There is not mentioned file I should put those lines in (I tried to search for new MapBBCode() in all files in forum (with notepad ++), but I couldn't find it)
It is, in the post: "You would have to download Google.js script and edit adm/styles/acp_mapbbcode.html and styles/*/template/mapbbcode_scripts.html (in the latest version of the MOD, otherwise overall_header.html and simple_header.html)"

leschek
Registered User
Posts: 755
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [BETA] Map BBCode

Post by leschek » Sun Nov 03, 2013 5:58 pm

That is a bit embarrassing. Sorry for wasting your time.

I believe I have installed last version of MOD, but I didn't find file styles/prosilver/template/mapbbcode_scripts.html, so I added the lines into overall_header.html and simple_header.html.
Now I can in ACP select layer Google maps, but I'm not able to add it as layer into map (I have no problem with other layers).

Zverik
Registered User
Posts: 16
Joined: Tue Oct 08, 2013 8:02 pm
Location: Saint-Petersburg, Russia
Name: Ilya Zverev
Contact:

Re: [BETA] Map BBCode

Post by Zverik » Sun Nov 03, 2013 7:08 pm

leschek wrote:That is a bit embarrassing. Sorry for wasting your time.

I believe I have installed last version of MOD, but I didn't find file styles/prosilver/template/mapbbcode_scripts.html, so I added the lines into overall_header.html and simple_header.html.
Now I can in ACP select layer Google maps, but I'm not able to add it as layer into map (I have no problem with other layers).
Sorry if I'm being a bit harsh, I am actually very glad you are trying the plugin :)

Is Google layer present in the layer list? If it is, and you cannot add the layer — did you download Google.js (the link is in the FAQ), put it into mapbbcode directory and add <script src="Google.js"> line to adm/styles/acp_mapbbcode.html?

leschek
Registered User
Posts: 755
Joined: Tue Jul 18, 2006 12:49 pm
Contact:

Re: [BETA] Map BBCode

Post by leschek » Sun Nov 03, 2013 8:48 pm

Zverik wrote:Is Google layer present in the layer list?
Yes
Zverik wrote:did you download Google.js (the link is in the FAQ), put it into mapbbcode directory
Yes I did. It's in the same directory as Bing.js, mapbbcode-config.js etc.
Zverik wrote:add <script src="Google.js"> line to adm/styles/acp_mapbbcode.html?
It looks this (a few lines around code I added):

Code: Select all

<script src="../mapbbcode/leaflet.js"></script>
<script src="../mapbbcode/Bing.js"></script>
<script src="../mapbbcode/mapbbcode-config.js"></script>
<script src="mapbbcode/Google.js"></script>
<script src="http://maps.google.com/maps/api/js?v=3&sensor=false"></script>
<script>window.layerList.list['Google Maps'] = 'new L.Google("ROADMAP")';</script>
<script src="../mapbbcode/language/{LA_MAPBB_LANGUAGE_JS}.Config.js"></script>

<a name="maincontent"></a>

<h1>{L_MAPBB_CONFIG}</h1>

Locked

Return to “[3.0.x] MODs in Development”

Who is online

Users browsing this forum: No registered users and 16 guests

cron