How do I insert an image attached to another post?

Discussion in 'General Topics' started by MudCrab, Jul 9, 2007.

Thread Status:
Not open for further replies.
  1. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,481
    Location:
    California
    I've done some searching, but haven't found any direct answer to what I'm trying to do.

    Say I have an image loaded into Post #8 of the thread I'm working on. I then want to redisplay that same image in Post #25.

    I can't reupload it because it says the file is already in use. I know I can resize/rename the file and reupload to make it work, but that shouldn't be necessary since the file already exists.

    Is there any easy way to use forum tags (ATTACH or IMG tags, for instance) to reference the image in the previous post (or even if it's in a different thread) and have it display the image (not a link)?

    I know the IMG tags can reference an image file, but what do I reference?

    If I look at the html source code for the page I can see how the attachment is coded, but I don't see how to use that to make the image show in the new post since it's using PHP.
    Code:
    <img src="http://www.wilderssecurity.com/attachment.php?attachmentid=191300&amp;d=1183852463" border="0" alt="Name:  linux_lf.jpg
    Views: 37
    Size:  190.3 KB" style="margin: 2px" /><br />
    I've tried just putting in the ATTACH tags (from the original post), but it doesn't work. It just makes the post say Attachment.... with a link and does this to ALL the attachments (even the new ones I've uploaded for the new post). I then have to close out the thread, reopen it and reupload the new images to get them to display correctly.

    Any help would be greatly appreciated. Thanks.
     
  2. WSFuser

    WSFuser Registered Member

    Joined:
    Oct 7, 2004
    Posts:
    10,632
    nvm - see next post
     
  3. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,481
    Location:
    California
    Thanks for the reply, however it just shows the attachment as a link.

    I want the actual picture to display, just like it was uploaded into the post.
     
  4. WSFuser

    WSFuser Registered Member

    Joined:
    Oct 7, 2004
    Posts:
    10,632
  5. LowWaterMark

    LowWaterMark Administrator

    Joined:
    Aug 10, 2002
    Posts:
    17,874
    Location:
    New England
    By design in vBulletin, an attachment will only display as an inline image within the post that it was originally upload to. That's noted in the bbcode FAQ for the ATTACH tag:

    That option is disabled by default as there are some malicious uses possible if enabled. Although the risk is not that massive, it is not recommended to enable. Since we're a security forum, we chose not to enable it.

    I'm afraid you won't be able to redisplay an attachment uploaded to one post in another post.
     
  6. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,481
    Location:
    California
    Okay. If that's the way it is, then that's the way it is. I was just hoping for an easy way to do it (they were my uploads in my posts, after all).

    Thanks for checking, I appreciate it.
     
  7. LowWaterMark

    LowWaterMark Administrator

    Joined:
    Aug 10, 2002
    Posts:
    17,874
    Location:
    New England
    We've just made a change to the forum software which we've been planning for a while that has a side effect which impacts this question directly.

    In the past, we never allowed what are called "dynamic URLs" to be used in IMG tags as it is not recommended because of a possible security exposure. The exposure is based on passing dynamic variables to third-party webservers via the use of special chrs in IMG tagged URLs. Since we've just disabled the use of IMG tags for images hosted on servers other than wilderssecurity.com, the exposure is now gone.

    Because of this, we have enabled dynamic URLs, which now makes it possible to display attachments in posts other than the original one they were attached to. You do this by using the full URL (seen by taking the URL from the properties of a displayed attachment) within IMG tags.

    So, for the example in the first post, this would by the bbcode to use, removing the * chrs:

    [IMG*]http://www.wilderssecurity.com/attachment.php?attachmentid=191300&amp;d=1183852463[/IMG*]

    This would cause the actual display of the image at that address:

    [​IMG]
     
Loading...
Thread Status:
Not open for further replies.