Log in

View Full Version : BB Code Enhancements - Simple Video Embed No Follow


RichieBoy67
01-23-2015, 10:00 PM
Hey everyone,

This is a simple template modification that adds rel="nofollow" to the video embed bbcode. Search engines see video embeds as duplicate content so this will help a bit with that.

I did this for one of my own sites and I thought it may help someone else.

##Instructions:
Go into your style manager and replace the contents of the template bbcode_video with this:
<vb:if condition="$provider == 'dailymotion'">
<object class="restrain" type="application/x-shockwave-flash" width="420" height="339" data="http://www.dailymotion.com/swf/{vb:raw code}" rel="nofollow">
<param name="movie" value="http://www.dailymotion.com/swf/{vb:raw code}" />
<param name="wmode" value="{vb:raw wmode}" />
<!--[if IE 6]>
<embed width="420" height="339" type="application/x-shockwave-flash" src="http://www.dailymotion.com/swf/{vb:raw code}" rel="nofollow" />
<![endif]--></object>
<vb:elseif condition="$provider == 'facebook'"/>
<iframe src="https://www.facebook.com/video/embed?video_id={vb:raw code}" rel="nofollow" width="720" height="450" frameborder="0"></iframe>
<vb:elseif condition="$provider == 'google'"/>
<object class="restrain" type="application/x-shockwave-flash" width="400" height="326" data="http://video.google.com/googleplayer.swf?docid={vb:raw code}" rel="nofollow">
<param name="movie" value="http://video.google.com/googleplayer.swf?docid={vb:raw code}" rel="nofollow" />
<param name="wmode" value="{vb:raw wmode}" />
<!--[if IE 6]>
<embed width="400" height="326" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docid={vb:raw code}" rel="nofollow" />
<![endif]--></object>
<vb:elseif condition="$provider == 'hulu'"/>
<object class="restrain" type="application/x-shockwave-flash" width="512" height="296" data="http://www.hulu.com/embed/{vb:raw code}" rel="nofollow">
<param name="movie" value="http://www.hulu.com/embed/{vb:raw code}" />
<param name="wmode" value="{vb:raw wmode}" />
<!--[if IE 6]>
<embed width="512" height="296" type="application/x-shockwave-flash" src="http://www.hulu.com/embed/{vb:raw code}" rel="nofollow" />
<![endif]--></object>
<vb:elseif condition="$provider == 'metacafe'"/>
<object class="restrain" type="application/x-shockwave-flash" width="400" height="345" data="http://www.metacafe.com/fplayer/{vb:raw code}.swf" rel="nofollow">
<param name="movie" value="http://www.metacafe.com/fplayer/{vb:raw code}.swf" />
<param name="wmode" value="{vb:raw wmode}" />
<!--[if IE 6]>
<embed width="400" height="345" type="application/x-shockwave-flash" src="http://www.metacafe.com/fplayer/{vb:raw code}.swf" rel="nofollow" />
<![endif]--></object>
<vb:elseif condition="$provider == 'vimeo'"/>
<object class="restrain" type="application/x-shockwave-flash" width="640" height="360" data="//vimeo.com/moogaloop.swf?clip_id={vb:raw code}" rel="nofollow">
<param name="movie" value="//vimeo.com/moogaloop.swf?clip_id={vb:raw code}" />
<param name="wmode" value="{vb:raw wmode}" />
<!--[if IE 6]>
<embed width="640" height="360" type="application/x-shockwave-flash" src="//vimeo.com/moogaloop.swf?clip_id={vb:raw code}" rel="nofollow" />
<![endif]--></object>
<vb:elseif condition="$provider == 'youtube'"/>
<iframe class="restrain" title="YouTube video player" width="640" height="390" src="//www.youtube.com/embed/{vb:raw code}?wmode={vb:raw wmode}" frameborder="0" rel="nofollow"></iframe>
<vb:elseif condition="$provider == 'youtube_share'"/>
<iframe class="restrain" title="YouTube video player" width="640" height="390" src="//www.youtube.com/embed/{vb:raw code}?wmode={vb:raw wmode}" frameborder="0" rel="nofollow"></iframe>
</vb:if>

concepts
02-09-2015, 08:38 PM
Perfect! Thank you!

Toorak Times
02-24-2015, 04:27 AM
Hi Richie, I recently replaced mybbcode_video with a HTML5 player version of the code.

Is this running html5 player mate?

...and, if possible, so far no good, can the vBTube be somehow included so I can drop the site code in and get a player appearing?

also vBEntertain?

Cheers

Mick

RichieBoy67
02-25-2015, 02:26 PM
Hi Richie, I recently replaced mybbcode_video with a HTML5 player version of the code.

Is this running html5 player mate?

...and, if possible, so far no good, can the vBTube be somehow included so I can drop the site code in and get a player appearing?

also vBEntertain?

Cheers

Mick

That is a little beyond the scope of this. This is the default Vbulletin Youtube bbcode with rel="nofollow" added, nothing more.

Thanks