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

XF 1.4 BBCode Problem

Mike

XenForo developer
Staff member
#2
Unfortunately I don't understand what you're asking. If you want to embed an image, you have to use the IMG BB code (or choose the option in the editor to insert an image).
 

Mike

XenForo developer
Staff member
#4
Oh, that's a BB code media site -- not a BB code.

The issue there seem to be that you haven't put the {$id} placeholder in correctly (see the explanation of the fields). Your HTML is also somewhat broken as well.
 
#5
Oh, that's a BB code media site -- not a BB code.

The issue there seem to be that you haven't put the {$id} placeholder in correctly (see the explanation of the fields). Your HTML is also somewhat broken as well.
Media Site ID: sdcdn
Site Title: sdcdn
Site URL: http://www.sdcdn.com
Match URLs: #www\.sdcdn\.com/camera/(?P<id>[0-9]+/[0-9]+)/#
Embed HTML: <img src="http://www.sdcdn.com/camera/{$id}.jpg" width="800" height="600"></img>

This URL look: http://www.sdcdn.com/camera/146/961.jpg
Original URL: http://www.sdcdn.com/camera/146/961/146961298.jpg
This is how BB Code style URLs are added?
 

Jake Bunce

XenForo moderator
Staff member
#6
Are you trying to display an inline image? Why not use the IMG tag?


[IMG]http://www.sdcdn.com/camera/146/961/146961298.jpg[/IMG]


 

Jake Bunce

XenForo moderator
Staff member
#12
Then I recommend you instruct your users to use IMG tags, like this:


[IMG]http://www.sdcdn.com/camera/146/961/146961298.jpg[/IMG]


Or the rich editor has a shortcut button for this:

Screen shot 2015-02-16 at 1.52.07 PM.png

The only reason to use a media site for this is for the automatic URL recognition which saves your users having to type [IMG] or clicking the button. However, the {$id} for this media site would include forward slashes which are escaped by the system. Therefore the only way to get it working is to code up a callback for custom handling. That's a bit of a pain when there is a built-in feature intended for this purpose (the [IMG] tag).