The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
![]()
Here's the code I added to view bmps. In admin/functions.php, I replaced this:
Code:
if ($post[attachmentid]!=0 and $post[attachmentvisible]) { $post[attachmentextension]=strtolower(getextension($post[filename])); if ($post[attachmentextension]=="gif" or $post[attachmentextension]=="jpg" or $post[attachmentextension]=="jpeg" or $post[attachmentextension]=="jpe" or $post[attachmentextension]=="png") { if (($viewattachedimages) and ($bbuserinfo[userid]==0 or $bbuserinfo[showimages])) { Code:
if ($post[attachmentid]!=0 and $post[attachmentvisible]) { $post[attachmentextension]=strtolower(getextension($post[filename])); if ($post[attachmentextension]=="gif" or $post[attachmentextension]=="jpg" or $post[attachmentextension]=="jpeg" or $post[attachmentextension]=="jpe" or $post[attachmentextension]=="png" or $post[attachmentextension]=="bmp") { if (($viewattachedimages) and ($bbuserinfo[userid]==0 or $bbuserinfo[showimages])) { Code:
if ($extension=='gif') { header('Content-type: image/gif'); } elseif ($extension=='jpg' or $extension=='jpeg') { header('Content-type: image/pjpeg'); } elseif ($extension=='png') { header('Content-type: image/png'); } elseif ($extension=='pdf') { header('Content-type: application/pdf'); } else { header('Content-type: unknown/unknown'); } Code:
if ($extension=='gif') { header('Content-type: image/gif'); } elseif ($extension=='jpg' or $extension=='jpeg') { header('Content-type: image/pjpeg'); } elseif ($extension=='png') { header('Content-type: image/png'); } elseif ($extension=='bmp') { header('Content-type: image/bmp'); } elseif ($extension=='pdf') { header('Content-type: application/pdf'); } else { header('Content-type: unknown/unknown'); } What I need to know is, do I need to add this anyplace else (like for the private attachments) or will this handle that also? And is there any way to come up with the filesize in the post next to an attachment so the user can decide if they want to wait to view it? I mean, if the filesize is too big and they are on dialup, it might be good to know the size of the file so they can decide if they want to wait for it to download to view. Also, is there a way to add something like a box as the graphic file is downloading for viewing to let the user know how long it will take? Almost like the downloading box. If anyone can please help me, I would really appreciate it. ![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|