Advertisement
NukedLT

vbulletin https youtube video code

Apr 13th, 2014
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. 1. Edit: /board/includes/xml/bbcode_video_vbulletin.xml
  2.  
  3. Add to bottom:
  4.  
  5. <provider tagoption="secureyoutube">
  6. <title>SecureYouTube</title>
  7. <url>https://www.youtube.com</url>
  8. <regex_url><![CDATA[https:\/\/www\.youtube\.com\/watch\?.*v=([a-z0-9-_]+)]]></regex_url>
  9. <regex_scrape></regex_scrape>
  10. <embed><![CDATA[<object class="restrain" type="application/x-shockwave-flash" width="640" height="385" data="http://www.youtube.com/v/{vb:raw code}?version=3&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;feature=player_embedded">
  11. <param name="movie" value="http://www.youtube.com/v/{vb:raw code}?version=3&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;feature=player_embedded" />
  12. <param name="wmode" value="transparent" />
  13. <param name="allowfullscreen" value="true" />
  14. <!--[if IE 6]>
  15. <embed width="640" height="385" type="application/x-shockwave-flash" src="http://www.youtube.com/v/{vb:raw code}?version=3&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;feature=player_embedded" allowfullscreen="true" />
  16. <![endif]--></object>]]></embed>
  17. </provider>
  18.  
  19. 2. Edit vb 'bbcode_video' template from admincp
  20.  
  21. Add to top:
  22.  
  23. <vb:elseif condition="$provider == 'secureyoutube'"/>
  24. <div class="video-wrapper"><div class="video-container">
  25. <iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/{vb:raw code}?theme=light" frameborder="0" allowFullScreen ></iframe></div></div>
  26. <!--[if IE 6]>
  27. <embed width="640" height="385" type="application/x-shockwave-flash" src="http://www.youtube.com/v/{vb:raw code}?version=3&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;feature=player_embedded" allowfullscreen="true" />
  28. <![endif]--></object>
  29.  
  30. 3. Enable vb debug mode.
  31.  
  32. 4. Rebuild video bbcode from admincp.
  33.  
  34. 5. Turn off debug.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement