vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   BB Code Enhancements - Simple Video Embed No Follow (https://vborg.vbsupport.ru/showthread.php?t=316899)

RichieBoy67 01-23-2015 10:00 PM

Simple Video Embed No Follow
 
1 Attachment(s)
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:
PHP Code:

<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

Quote:

Originally Posted by Toorak Times (Post 2538519)
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


All times are GMT. The time now is 07:54 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01994 seconds
  • Memory Usage 1,759KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete