Hi to all,
I maked an update to get it worked also on a modal windows.
the problem was is the path, becouse on a modal windows you lose the path of the file, and you can't download it.
inside the Function display_block( $file ) I have added a line to retrive the path
$absolute_path = (@$_SERVER["HTTPS"] == "on") ? "https://" : "http://" . $_SERVER["SERVER_NAME"] . '/' . trim(dirname($_SERVER["PHP_SELF"]),'/');
then I put the result inside herf just before $file
Hi to all, I maked an update to get it worked also on a modal windows. the problem was is the path, becouse on a modal windows you lose the path of the file, and you can't download it.
inside the Function display_block( $file ) I have added a line to retrive the path $absolute_path = (@$_SERVER["HTTPS"] == "on") ? "https://" : "http://" . $_SERVER["SERVER_NAME"] . '/' . trim(dirname($_SERVER["PHP_SELF"]),'/');
then I put the result inside herf just before $file
$rtn = "<div class=\"block\">"; $rtn .= "<a href=\"$absolute_path\$file\" class=\"$file_ext\"{$download_att}>"; $rtn .= " <div class=\"img $file_ext\">
what do you think?
Best regards Stefano