Announcement

Collapse
No announcement yet.

MS Word docs & Attachment.php

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MS Word docs & Attachment.php

    Based on search results found on the vbulletin support forums, I have done the following edits to the Attachment.php file for pdf and doc files.

    However, when I click the doc file attachment in the thread, I get a new I.E. window with the windows default image symbol instead of the doc file-see attachment. When I click the pdf file, the file opens fine in a new I.E. window. Any suggestions?

    if ($extension=='gif') {
    header('Content-type: image/gif');
    } elseif ($extension=='jpg' or $extension=='jpeg') {
    header('Content-type: image/jpeg');
    } elseif ($extension=='png') {
    header('Content-type: image/png');
    } elseif ($extension=='pdf') {
    header('Content-type: application/pdf');
    } elseif ($extension=='doc') {
    header('Content-type: application/msword');
    } elseif ($extension=='php') {
    header('Content-type: application/x-httpd-php4');
    } else {
    header('Content-type: unknown/unknown');
    }
    echo $attachmentinfo[filedata];
    ?>
    Attached Files

  • #2
    You need to discuss code modifications at vbulletin.org.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment

    Related Topics

    Collapse

    Working...
    X