Fixed custom Media bbCode for local videos

lightbox

Active member
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. :)
 
To try this bug the easy way, you can simply use an image (see attached screenshot).

bbcodeexample1.webp

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. :)
 
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.
 
Top Bottom