Home › Forum › Wp Gpx Maps › Support › Added support for displaying post attachments
- Questo topic ha 6 risposte, 2 partecipanti ed è stato aggiornato l'ultima volta 8 anni, 5 mesi fa da sammydisam.
-
AutorePost
-
StephanOspite
Hi,
first of all thanks for the great plugin. Although I read, that you will reduce the support of this plugin I just wanted to let you know, that I added support to display images that are attached to the post. So you don’t need to use the NGG plugin if you just want to display some photos on the map. You may just use the new short code parameter attachments=true to include all images that are directly attached to a post.
I just made some minor changes in wp-gps-maps.php to support the new shortcode and added a function getAttachedImages($dt, $lat, $lon, $dtoffset, &$error) in wp-gpx-maps_utils.php, that is quite similar to function getNGGalleryImages($ngGalleries, $ngImages, $dt, $lat, $lon, $dtoffset, &$error).
You may find an archive with the changes at https://klein-gedruckt.de/wp-content/uploads/2015/03/wp-gpx-maps.1.3.6_klein-gedruckt.zip
and a summary of the changes at https://klein-gedruckt.de/2015/03/wordpress-plugin-wp-gpx-maps/ (sorry, german only).I would be glad if you can include these changes in a future version.
Thanks again for the great plugin. :good:
Cheers
StephanmaxAmministratore del forum:good:
Changes added in 1.3.7 version
Thank you Stephan KleinJohne20OspiteAmazing YouTube movies posted at this website, I am going to subscribe for daily updates, as I dont want to fail to take this series. eaceegcdgeed
Johnf1OspiteI do agree with all the ideas you have introduced for your post. They are really convincing and can certainly work. Still, the posts are very brief for newbies. May you please extend them a bit from subsequent time? Thank you for the post. ckkkebkfdafe
Smithe559OspiteReally wonderful information can be found on web blog. gbfkbccceedccdke
sixsixninenineOspiteHi,
If the post attachments do not have EXIF lat and lon data, it won’t check the the created_timestamp of the image_metadata until the following changes are made:
line 39:
else if (isset($img_metadata['image_meta']['created_timestamp']))
and
line 41:
$_dt = $img_metadata['image_meta']['created_timestamp'] + $dtoffset;
Thanks,
sammydisamOspiteWP GPX Maps Error: GPX file not found! /home/mxvysmpn/public_html/wp-content/uploads/sites/3/gpx/3014827.gpx
Warning: Attempt to read property "dt" on array in /home/mxvysmpn/public_html/wp-content/plugins/wp-gpx-maps/wp-gpx-maps.php on line 416
Warning: Attempt to read property "lat" on array in /home/mxvysmpn/public_html/wp-content/plugins/wp-gpx-maps/wp-gpx-maps.php on line 417
Warning: Attempt to read property "lon" on array in /home/mxvysmpn/public_html/wp-content/plugins/wp-gpx-maps/wp-gpx-maps.php on line 418
Warning: Attempt to read property "maxEle" on array in /home/mxvysmpn/public_html/wp-content/plugins/wp-gpx-maps/wp-gpx-maps.php on line 420
Warning: Attempt to read property "minEle" on array in /home/mxvysmpn/public_html/wp-content/plugins/wp-gpx-maps/wp-gpx-maps.php on line 421
Warning: Attempt to read property "maxTime" on array in /home/mxvysmpn/public_html/wp-content/plugins/wp-gpx-maps/wp-gpx-maps.php on line 422
Warning: Attempt to read property "minTime" on array in /home/mxvysmpn/public_html/wp-content/plugins/wp-gpx-maps/wp-gpx-maps.php on line 423
Warning: Attempt to read property "totalEleUp" on array in /home/mxvysmpn/public_html/wp-content/plugins/wp-gpx-maps/wp-gpx-maps.php on line 424
Warning: Attempt to read property "totalEleDown" on array in /home/mxvysmpn/public_html/wp-content/plugins/wp-gpx-maps/wp-gpx-maps.php on line 425
Warning: Attempt to read property "avgSpeed" on array in /home/mxvysmpn/public_html/wp-content/plugins/wp-gpx-maps/wp-gpx-maps.php on line 426
Warning: Attempt to read property "avgCad" on array in /home/mxvysmpn/public_html/wp-content/plugins/wp-gpx-maps/wp-gpx-maps.php on line 427
Warning: Attempt to read property "avgHr" on array in /home/mxvysmpn/public_html/wp-content/plugins/wp-gpx-maps/wp-gpx-maps.php on line 428
Warning: Attempt to read property "avgTemp" on array in /home/mxvysmpn/public_html/wp-content/plugins/wp-gpx-maps/wp-gpx-maps.php on line 429
Warning: Attempt to read property "totalLength" on array in /home/mxvysmpn/public_html/wp-content/plugins/wp-gpx-maps/wp-gpx-maps.php on line 430
Hello,
This is exactly what I have been looking for!
I’m having an issue with the attachments shortcode though. When I added it, the whole page doesn’t load, even if I add attachments=false
© OpenStreetMap contributorsjQuery(document).ready(function() {
jQuery( "#wpgpxmaps_25357_334408" ).wpgpxmaps( { targetId : "25357_334408", mapType : "HYBRID", mapData : [], graphDist : [], graphEle : [], graphSpeed : [], graphHr : [], graphAtemp : [], graphCad : [], graphGrade : [], waypoints : [], unit : "0", unitspeed : "0", color1 : ["#3366cc"], color2 : "#3366cc", color3 : "#ff0000", color4 : "#ff77bd", color5 : "#beecff", color6 : "#beecff", color7 : "#ff77bd", chartFrom1 : "", chartTo1 : "", chartFrom2 : "", chartTo2 : "", startIcon : "", endIcon : "", currentIcon : "", waypointIcon : "", currentpositioncon : "", usegpsposition : "", zoomOnScrollWheel : "", ngGalleries : [], ngImages : [], pluginUrl : "http://devfarm.it/wp-content/plugins", TFApiKey : "74091772296743e3a6914fa00e348953", langs : { altitude : "Altitudine", currentPosition : "Current position", speed : "Velocità", grade : "Grade", heartRate : "Battito Cardiaco", atemp : "Temperature", cadence : "Cadenza", goFullScreen : "Go full screen", exitFullFcreen : "Exit full screen", hideImages : "Hide images", showImages : "Show images", backToCenter : "Ritorna al centro della mappa" } });
});
Do you have any ideas on how I can troubleshoot this.
I’m on the latest version on WP and this plug-in.
Thanks,
Sam -
AutorePost