pderks
Forum Replies Created
-
Forum: Plugins
In reply to: [Filedownload] Why do I get a unwanted string in my gpx fileHi Peter,
It’s the basic shortcode: [filedownload file=”uploads/gpx/Dommeldal-2012.gpx”]Download gpx bestand[/filedownload]
You can have a look at the website https://www.tcerp.nl/activiteiten/activiteit/dommeldal-2012/This is what i’ve done to get it working:
In the function filedownload_shortcode_handle($atts, $content = null)
I’ve changed the return function
from
return "<a href="$plugin_dir/filedownload/download.php/?path=$path&type=$type&check=$check&referer=$referer">$span$content</span></a>";
to
return "<a href="$plugin_dir/filedownload/download.php/?path=$path">$span$content</span></a>";
=> I deleted all the parameters exept $filename (for me no problem since i’m not using the parameters).
Forum: Plugins
In reply to: [Filedownload] Why do I get a unwanted string in my gpx fileHi Peter,
Thanks for your reply. I already suspected that my new provider was interpreting the php command differently, so I also send them an email with the same question. They responded quickly and told me that is is better to put the plugin parameter $type as last parameter in the command. They told me that the parameters after the $type parameter are also seen as the $type parameter. I searched in the plugin and, since I’m not using the other parameters, I deleted the other parameters (like $check) from the readfile($path) command (so only using parameters $filename and $type. Guess what? It worked!
I’m not a professional php programmer and I still don’t understand exactly what was wrong, but I’m happy I’ve got it working.
Mayby you can have a deeper look at it.
Thanks Peter