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

Fixed custom Media bbCode for local videos

lightbox

Active member
#1
I have a website mysite.com running XenForo.
I have lots of videos (tutorials) on my site to post to XenForo threads.
I store these videos (and some additional files) in subfolders like:

  • mysite.com/videotutorials/photoshop/howtomakeshadows/
  • mysite.com/videotutorials/xenforo/custommediabbcode/
What I need to pass through my custom Media bbCode would look like this:

  • [media=mysitename]photoshop/howtomakeshadows[/media]
  • [media=mysitename]xenforo/custommediabbcode[/media]
Problem is, that the string is stripped at the slash.
So all that is passed to the corresponding place in the object code is:

  • photoshop
  • xenforo
... and the whole thing doesn't work as you can imagine. :)
 

lightbox

Active member
#2
To try this bug the easy way, you can simply use an image (see attached screenshot).

bbcodeexample1.png

Expected result in HTML code would be:
<img src="http://mysite.com/folder/subfolder/myimage.jpg" alt="" />

Actual result is:
<img src="http://mysite.com/folder/myimage.jpg" alt="" />

Hope this helps. :)
 

Mike

XenForo developer
Staff member
#3
I'm not sure how you actually got that result. If you have a media tag with a slash in the value, you'd get nothing. If you're pasting the URL into the media popup, then that is the expected behavior. The slash is traditionally a splitter for IDs.

I have changed this to allow the slash to be manually placed within the media BB code tag though.