vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   LazyLoad Youtube BB Code (https://vborg.vbsupport.ru/showthread.php?t=309181)

NukedLT 03-05-2014 12:12 AM

LazyLoad Youtube BB Code
 
I've got a number of threads that are predominantly videos, for example a 'Movie Trailers' thread I have the board automatically post to from a youtube RSS feed. It doesn't take many before it starts to crawl. Wrapping them in 'spoiler' tags help, but it's an ugly workaround.

I've got a lazyload concept working, but I'm not too familiar with jquery/javascript and it's very simplistic.

http://www.landthieves.com/board/showthread.php?70130

A single div with the dimensions of the player and the youtube thumbnail set as the background. Clicking the div fires the jquery .html() to insert the youtube iframe which autoplays.

jfiddle: http://jsfiddle.net/9t2q7/13/

I know inline script is frowned upon, especially when redundant, but I'm using the {param} to give the div a unique ID on top of the embed/thumbnail.

Is there a more efficient way of doing this?

charlesr 01-25-2017 06:34 AM

Quote:

Originally Posted by NukedLT (Post 2485121)

Is there a more efficient way of doing this?

Did you get any further with this?


All times are GMT. The time now is 01:06 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.00951 seconds
  • Memory Usage 1,709KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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