1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Automatically convert image URLs to BB Code IMG?

Discussion in 'XenForo Questions and Support' started by Mouth, Mar 3, 2014.

  1. Mouth

    Mouth Well-Known Member

    Is it possible to automatically convert pasted URL's for images to be within the [ IMG ] bb code?

    Scenario: Whilst entering my thread/post text I also type/paste in the URL for an image, eg. http://site.com/images/123.jpg and rather than the URl become hyperlinked, have XF wrap it within [ IMG ] bb code tags (because it ended it jpg|png|gif) so that the image displays immediately (and new v1.3 image proxy can do its thang!)
    akia and AndyB like this.
  2. AndyB

    AndyB Well-Known Member

    That would be a great time saver. Of course if the image URL had the [ URL ] BB Codes surrounding it, then no automatic BB Code wrapping should occur.
  3. Mike

    Mike XenForo Developer Staff Member

    You can't rely on the apparent extension of a URL. You'd have to actually go retrieve the content to make any determinations about it.
  4. Mouth

    Mouth Well-Known Member

    Agreed. But the extension would be a good 'trigger' for the action of asking the destination web server what the content type is it will deliver from the URL

Share This Page