Frank, thanks the code was a bit too early - didn't read the code thorough enough.. smile

Hmm. rawurlencode makes every special charter as %-something.. It doesn't look good..

I'm decided to use the  _ to replace the gaps - it makes the filenames look "better", so the code would be:

$attach_filename = str_replace (" ", "_", $attach_filename);

But everyone does how they like it better.. wink

Found a way to get aroud the bug with spaces in the filename.

I tested using sn0n:n idea of str_replace. It actually works (atleast with my firefox, mozilla and IE). You can use either %20 or _ which ever you want.

Just edit your attachment.php and add the following at line 86 after:
list($attach_mime,$attach_data) = $result;

                //Edit 7.5.2004 by seppo_@hotmail.com    
                //Fixes problem with spaces in the filenames
                $attach_filename = str_replace (" ", "%20", $attach_filename);

and before
if(!isset($_GET['download'])&&($attach_mime=="image/jpg"||$attach_mime=="image/jpeg"||$attach_mime=="image/pjpeg"||$attach_mime=="image/gif"||
$attach_mime=="image/png"||$attach_mime=="image/x-png")){

Problem using Mozilla and attachments,

I'm not sure if this a bug in the mozilla engine or if it is fixable by you great code.. smile

Anyways, the problem is that when an attachment has a space in the name, mozilla tryes to open a attament named only by the first word..

Let me demonstare, so you can understand.. smile

I have uploaded an attachment named: "very nice attacment.doc"

When i'm trying to open the attachment with Internet Explorer, it open the file nicely. BUT when i'm opening the same attachment with Mozilla, the browser tryes to open file called "very" and so doens't know how to open it... This is quite a proble though i'm using Mozilla myself and I'm using this BBS and your mod at work, so there are quite important documents that need to be opened with out trouble..

Thanks for a great mod! This has been very helpfull! smile