PDA

View Full Version : Displaying the attachments in the message body


Mike Litvinov
08-07-2013, 09:08 AM
We have problem with displaying the attachment in the message body (eg zip pdf or rar file)
First successfully uploading the file and puting it into a message body (editor is in sourcecode mode); We'll see something like this [ATTACH = CONFIG] 9512 [/ ATTACH] and that is great!
But then, when switching editor to vizual mode,
inplace of file thumb, we will see small broken picture icon (in Firefox)!
Ps After posting message, everything looks ok

Any idea how to fix?
Thnx

Lynne
08-07-2013, 04:07 PM
Can you click on the broken image and get the image path? Then you can see where it is looking for the image and figure out why it is wrong.

DF031
08-07-2013, 04:21 PM
As far as I know . . . . . All is ok. That is standard. VB does not display pdf inline or below the message. It just displays an icon or text link. Clicking the icon or text link downloads or opens the attachement.

For each of those file types one should upload 2 icons, on questionmark icon and one filetype icon.

If needed I can tell you in detail how to do it later. (In a restaurant now)

Mike Litvinov
08-08-2013, 07:47 AM
Thanks for answering and trying to solve my problem, but it still there..
I made some tests of my problem
Examle of code created by inserting:
1) png image
2) rar file
3) horiz line

9535
9536


screen shot of what i will see when switching to vizual mode
as you can see 2-(rar file) looks like broken picture.
i think problem is with code that is generated when attachment is inserted? it shoud look like this

9536 without "config" part

Why this happend? how to fix this? how forum understand what is picture attachment and what is file attachment ?

Mike Litvinov
08-08-2013, 07:51 AM
Can you click on the broken image and get the image path? Then you can see where it is looking for the image and figure out why it is wrong.
This is src url of broken image ..forum/attachment.php?attachmentid=9536&stc=1
But i think it's wrong because forum think it was picture attachement (and actualy it was rar)

--------------- Added 1375952101 at 1375952101 ---------------

As far as I know . . . . . All is ok. That is standard. VB does not display pdf inline or below the message. It just displays an icon or text link. Clicking the icon or text link downloads or opens the attachement.

For each of those file types one should upload 2 icons, on questionmark icon and one filetype icon.

If needed I can tell you in detail how to do it later. (In a restaurant now)
Yes that will be great if you tell me more. For examp where to find some options about this in admin panel. Or where to put this icons...

DF031
08-08-2013, 02:58 PM
I use the following method . . .

For instace a PDF file

Add 2 icons to the folder ....../images/attach/

The names should be pdf_thumb.gif and pdf.gif

The first one is a question mark which is used in the Manage Attachements window and is the same for all non-image attachements. The second one is a file icon, I use the adobe reader logo.

I use these two:

https://dl.dropboxusercontent.com/u/2287968/Forums/VBorg6584/pdf_thumb.gif and https://dl.dropboxusercontent.com/u/2287968/Forums/VBorg6584/pdf.gif

To do this for RAR the file names would be rar_thumb.gif and rar.gif. The first one would be the question mark again (atleast afaik that is the standard VBulletin method) and the second one would be a rar icon.