diff --git a/readme.txt b/readme.txt index 5135dd0..e5f9485 100644 --- a/readme.txt +++ b/readme.txt @@ -1,11 +1,11 @@ === WP GPX Maps === -Contributors: bastianonm +Contributors: bastianonm, Stephan Klein Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8VHWLRW6JBTML Tags: maps, gpx, gps, graph, chart, google maps, track, garmin, image, nextgen-gallery, nextgen, exif, OpenStreetMap, OpenCycleMap, Hike&Bike, heart rate, heartrate, cadence Requires at least: 2.0.0 -Tested up to: 4.0 -Stable tag: 1.3.6 +Tested up to: 4.1.1 +Stable tag: 1.3.7 Draws a gpx track with altitude graph. You can also display your nextgen gallery images in the map. @@ -33,6 +33,10 @@ Even if you don't have a gps camera, this plugin can retrive the image position Old NGGallery Images (without gps data) and gpx: http://www.pedemontanadelgrappa.it/mappe/itinerario-3-alta-via-degli-eroi/ +Post Attachments Integration: + +This version is extended by Stephan Klein (https://klein-gedruckt.de/2015/03/wordpress-plugin-wp-gpx-maps/) and supports displaying all images attached to a post without using NGG. + Translated into 14 languages: - Catalan ca @@ -187,6 +191,8 @@ Yes! 1. Altitude & Speed & Hearth rate == Changelog == += 1.3.7 = +* NextGen Gallery's Attachment support. Thanks to Stephan Klein (https://klein-gedruckt.de/2015/03/wordpress-plugin-wp-gpx-maps/) = 1.3.6 = * Fix: remote file download issue * Fix: download file link with WPML diff --git a/wp-gpx-maps.php b/wp-gpx-maps.php index e30b312..783370f 100644 --- a/wp-gpx-maps.php +++ b/wp-gpx-maps.php @@ -226,6 +226,8 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='') $waypointIcon = findValue($attr, "waypointicon", "wpgpxmaps_map_waypoint_icon", ""); $ngGalleries = findValue($attr, "nggalleries", "wpgpxmaps_map_ngGalleries", ""); $ngImages = findValue($attr, "ngimages", "wpgpxmaps_map_ngImages", ""); + // folgende Zeile hinzugefügt: + $attachments = findValue($attr, "attachments", "wpgpxmaps_map_attachments", false); $download = findValue($attr, "download", "wpgpxmaps_download", ""); $dtoffset = findValue($attr, "dtoffset", "wpgpxmaps_dtoffset", 0); $distanceType = findValue($attr, "distanceType", "wpgpxmaps_distance_type", 0); @@ -564,6 +566,15 @@ function handle_WP_GPX_Maps_Shortcodes($attr, $content='') $ngimgs_data .= ''.$data.''; } } +// Folgende Zeilen hinzugefügt + if ($attachments == true) { + $attimgs = getAttachedImages($points_x_time, $points_x_lat, $points_x_lon, $dtoffset, $error); + foreach ($attimgs as $img) { + $data = $img['data']; + $data = str_replace("\n","",$data); + $ngimgs_data .= ''.$data.''; + } + } if (!($skipcache == true)) { diff --git a/wp-gpx-maps_admin.php b/wp-gpx-maps_admin.php index 34e58cd..1f0d50e 100644 --- a/wp-gpx-maps_admin.php +++ b/wp-gpx-maps_admin.php @@ -130,6 +130,8 @@ function WP_GPX_Maps_html_page() {