vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Displaying the attachments in the message body (https://vborg.vbsupport.ru/showthread.php?t=300907)

Mike Litvinov 08-07-2013 09:08 AM

Displaying the attachments in the message body
 
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

1 Attachment(s)
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
HTML Code:

[ATTACH=CONFIG]9535[/ATTACH]
[ATTACH=CONFIG]9536[/ATTACH]

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
HTML Code:

[ATTACH]9536[/ATTACH] 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

Quote:

Originally Posted by Lynne (Post 2437683)
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 [DATE]1375952101[/DATE] at [TIME]1375952101[/TIME] ---------------

Quote:

Originally Posted by DF031 (Post 2437689)
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/.../pdf_thumb.gif and https://dl.dropboxusercontent.com/u/...rg6584/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.


All times are GMT. The time now is 11:50 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01640 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete