RSS feeds in the directory: 2817
Added today: 0
Added yesterday: 0
Video animates Your website, improve behavioral factors. But one thing, when the video illustrates the article and it is quite another thing if You want to make the video widget to embed the template of your site. In the latter case, behavioral factors (PF) on the contrary will worsen. The fact that to see the splash screen of the same video while moving around the website the user will be unpleasant to contemplate. What to do? Correctly implement the ability to display the videos randomly (random).
option 1 in PHP
you Can make an array of ready video codes Youtube, put them in a plain text file (each code on a separate line) example:
And retrieve this array of random line by posting on its website (in the widget/sidebar) like this PHP code:
This code is implemented in the footsteps of the article "Create a widget with random data".
it would be good, but such unfriendly code with static caching, which I love to include webmasters in the pursuit of high performance "PageSpeed Insights". If the site has a cache, then this widget will not work for dynamic (updating page in the browser will not generate a random video)!
this code Consists of 3 parts:
an Array of video files (the format is video id from Youtube); Functions for getting random numbers; Rendering the iframe (the full code of the Youtube player);
In practice, it looks like the following:
This code displays in the user's browser random video (of the proposed array) from Youtube. The seamless attribute in an iframe means that the content of the frame will appear as if it is part of the document. And set the width to width=1280 means that the video carefully fill the allotted area of the screen.
What is crowd-reference and where to get it for free? 07.08.2018 at 17:50
To change the design of the login page of WordPress 14.07.2018 at 15:16
Do bulk SMS today? 22.05.2018 at 20:43
As Yandex disliked all cryptanalytical together 09.04.2018 at 11:14
Delete clones of your site out of the index PS 07.04.2018 at 10:35
Contact Form 7 sent the data determines how SPAM 28.03.2018 at 10:00
"Call me back" with the receipt of SMS alert 20.03.2018 at 08:07
How to buy Xiaomi 13.02.2018 at 10:16
Mining cryptocurrency from scratch (on a PC) 14.12.2017 at 21:33