diff --git a/fp-plugins/bbcode/plugin.bbcode.php b/fp-plugins/bbcode/plugin.bbcode.php index df8ca859..839b2341 100644 --- a/fp-plugins/bbcode/plugin.bbcode.php +++ b/fp-plugins/bbcode/plugin.bbcode.php @@ -255,8 +255,8 @@ function bbcode_remap_url(&$d) { } // NWM: "attachs/" is interpreted as a keyword, and it is translated to the actual path of ATTACHS_DIR - // CHANGE! we use the getfile.php script to mask the actual path of the attachs dir! - // FKM: We now use a get.php script to hide the attachs directory + // Attachment downloads can be routed through get.php to hide ATTACHS_DIR. + // Image paths remain direct filesystem/public paths; get.php is download-only. // DMKE: I got an idea about an integer-id based download/media manager... work-in-progress if (strpos($d, ':') === false) { // if is relative url @@ -275,13 +275,8 @@ function bbcode_remap_url(&$d) { $d = BBCODE_USE_FILEWRAPPER ? 'get.php?f=' . urlencode(basename($d)) : substr_replace($d, ATTACHS_DIR, 0, 8); return true; } - if (substr($d, 0, 8) == 'attachs/') { - $d = BBCODE_USE_WRAPPER ? 'getfile.php?f=' . basename($d) . '&dl=true' : substr_replace($d, ATTACHS_DIR, 0, 8); - return true; - } if (substr($d, 0, 7) == 'images/') { $d = substr_replace($d, IMAGES_DIR, 0, 7); - $d = BBCODE_USE_WRAPPER ? 'getfile.php?f=' . basename($d) : $d; } return true; } diff --git a/fp-plugins/thumb/plugin.thumb.php b/fp-plugins/thumb/plugin.thumb.php index c66a1387..b53e3580 100755 --- a/fp-plugins/thumb/plugin.thumb.php +++ b/fp-plugins/thumb/plugin.thumb.php @@ -110,7 +110,7 @@ function plugin_thumb_create($fpath, $infos, $new_width, $new_height) { * Added by Piero VDFN * Kudos to http://www.php.net/manual/en/function.imagecopyresampled.php#104028 */ - if ($infos[2] == 1 || $infos[2] == 3 || $infos[2] == 18) { + if ($infos [2] == 1 || $infos [2] == 3 || $infos [2] == 18) { imagecolortransparent($scaled, imagecolorallocatealpha($scaled, 0, 0, 0, 127)); imagealphablending($scaled, false); imagesavealpha($scaled, true); @@ -158,7 +158,7 @@ function plugin_thumb_create($fpath, $infos, $new_width, $new_height) { function plugin_thumb_bbcodehook($actualpath, $props, $newsize) { list ($width, $height) = $newsize; if ($thumb = plugin_thumb_create($actualpath, $props, $width, $height)) { - $thumb = BBCODE_USE_WRAPPER ? ("getfile.php?f=" . basename($actualpath) . '&thumb=true') : $thumb [0]; + $thumb = $thumb [0]; } return $thumb; }