Ticket #1919 (new enhancement)

Opened 14 months ago

Last modified 9 months ago

Inter-module dependencies / optional code

Reported by: sminnee Owned by: lperera
Priority: medium Milestone:
Component: Modules - Google Maps Version:
Severity: medium effort / impact Keywords:
Cc: Hours:

Description

It would be cool to have a Google Maps widget. The user could somehow mark up the map with a number of points - manual entry of the points would be the most flexible, but perhaps it could be manual entry *or* choose from a number of pre-defined data-sources.

This will become particularly useful when we enable widgets on pages other than the blog, as a user would be able to include a maps widget on a page that would benefit from some map content, mark the relevant places on the map, and presto!

Ideally, you could have a GoogleMapData? interface/base-class that other modules could implement, and the GoogleMaps? would provide a set of points showing where the forum members are from. This would basically be an abstraction of what has already been implemented.

One of the current limitations of the system would be that the MapData? class should only be referenced if both the forum module and the googlemaps module are installed.

A clumsy solution would be to put the integration code separate forum_gmap_integration module, but that is going to lead to a lot of modules.

An alternative would be to put the code into forum/intermodule/googlemaps/ForumMemberMapData.php - and give the ManifestBuilder? the knowledge that intermodule/(modulename)/ should only be traversed if module

Finally, we could add something forum/_config.php to set that restriction up explicitly. This has the benefit of keeping "magic" out of ManifestBuilder?. Something like this would tell the manifest to only traverse forum/googlemaps_integration if the googlemaps module was also included.

ManifestBuilder::require_module('googlemaps', 'forum/googlemaps_integration/');

I've started a discussion on silverstripe-dev about this issue.

Change History

Changed 9 months ago by sminnee

  • summary changed from Google Map widget to Inter-module dependencies / optional code
Note: See TracTickets for help on using tickets.