Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter pderks

    (@pderks)

    Hi 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).

    Thread Starter pderks

    (@pderks)

    Hi 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

Viewing 2 replies - 1 through 2 (of 2 total)