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

XF 1.5 BB Code for Media Site

RSI

Active member
#1
Does anyone have the BB Code info to embed videos from Fox News (foxnews.com)? I need to add it to the BB Code Media Sites list if possible. They may have restrictions on it, but I'm not sure.
.
 

Chris D

XenForo developer
Staff member
#2
Looks fairly simple.

This is the embed code:
HTML:
<script type="text/javascript" src="//video.foxnews.com/v/embed.js?id=5094247534001&w=466&h=263"></script><noscript>Watch the latest video at <a href="//video.foxnews.com">video.foxnews.com</a></noscript>
From this URL:
http://video.foxnews.com/v/5094247534001/

Note that the "ID" is the same in the embed code as it is in the URL (5094247534001).

So, realistically, it should be just a case of copying and slightly adjusting the definition of one of the existing ones, like Liveleak.
 

DL6

Well-known member
#4
Looks fairly simple.

This is the embed code:
HTML:
<script type="text/javascript" src="//video.foxnews.com/v/embed.js?id=5094247534001&w=466&h=263"></script><noscript>Watch the latest video at <a href="//video.foxnews.com">video.foxnews.com</a></noscript>
From this URL:
http://video.foxnews.com/v/5094247534001/

Note that the "ID" is the same in the embed code as it is in the URL (5094247534001).

So, realistically, it should be just a case of copying and slightly adjusting the definition of one of the existing ones, like Liveleak.
For some reason this didn't work when i tested
Edit: this works too, only in the preview i get this
1502904286071.png
This works for me
Code:
<iframe src="//video.foxnews.com/v/video-embed.html?video_id={$id}" width="466" height="263" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe>
1502903805872.png
 
Last edited:

RSI

Active member
#5
This works for me
Code:
<iframe src="//video.foxnews.com/v/video-embed.html?video_id={$id}" width="466" height="263" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe>
View attachment 155917
What are you using in Match URLs: ?

I've tried a few things like video.foxnews.com/v/?i={$id} and they don't work.


Untitled.png
 

RSI

Active member
#6
I've tried a lot of different combinations like the below and I cannot get it to work.

video.foxnews.com/v/view?video_id={$id}

video.foxnews.com/view?video_id={$id}

.
 

Chris D

XenForo developer
Staff member
#8
The match URL has to be the URL that you would paste into a post, which would be the URL you see in your browser when you're actually viewing the video normally.
 

RSI

Active member
#9
http://video.foxnews.com/v/{$id}/
Huh..., I still cannot get it to work

Media Site ID:
Code:
foxnews
Site Title:
Code:
FoxNews
Site URL:
Code:
http://www.foxnews.com
Match URLs:
Code:
http://video.foxnews.com/v/{$id}/
Embed HTML:
Code:
<iframe src="//video.foxnews.com/v/video-embed.html?video_id={$id}" width="466" height="263" marginwidth="0" marginheight="0" frameborder="0" scrolling="no">
.
 

RSI

Active member
#10
The match URL has to be the URL that you would paste into a post, which would be the URL you see in your browser when you're actually viewing the video normally.
I know, I've done this before, but for some reason I cannot get it to work. It's probably something really simple that I'm just missing.

Neither one of the below work...
Code:
http://video.foxnews.com/v/{$id}/
Code:
https://video.foxnews.com/v/{$id}/
.
 

RSI

Active member
#14
Thanks, but it did in fact turn out to be something really simple.

When I copied and pasted the Embed HTML: line you posted is was missing the </iframe> on the end :mad::LOL: My fault...
 

RSI

Active member
#15
Only one big problem, I forgot you could not embed non-secure http video on a secure https page :confused: My whole domain is SSL now.

Guess I should have made sure I could load the videos using https in the address first :cautious:

Untitled.png
.
 

Chris D

XenForo developer
Staff member
#16
If you replace the iframe src in the Embed HTML field with this:
Code:
https://video.foxnews.com/static/p/video/app/embed/iframe/vod.html?video_id={$id}
does that solve it?
 

RSI

Active member
#17
I'm actally trying to use the below. I had only posted that other direct link to try and figure out what was going on before.

Neither one of the below work
Code:
<iframe src="//video.foxnews.com/v/video-embed.html?video_id={id}" width="500" height="300" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe>
Code:
<iframe src="http://video.foxnews.com/v/video-embed.html?video_id={id}" width="500" height="300" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe>