Youtube Spoiler Fancy - спойлер для ютуб видео роликов в постах.
vB Version: 4.2.x
Mod Version: 1.00
INSTALL
Please back up your "bbcode_video" code before making any edits so you can restore if mistakes happen.
CODE
In admincp » Styles & Templates » Style Manager » Edit Templates » BB Code Layout Templates » bbcode_video
Find: line 8
<vb:elseif condition="$provider == 'youtube'" />
Find and replace: line 9
Код:
<iframe title="YouTube video player" width="640" height="360" src="//www.youtube.com/embed/{vb:raw code}?wmode={vb:raw wmode}" frameborder="0" allowfullscreen></iframe>
With: line 9
Код:
<div style="padding-top:4px;padding-right:4px;">
<div>
<img name="YouTube Spoiler" type="image" src="images/YT_open.jpg" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.src = 'images/YT_close.jpg'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = '';this.src = 'images/YT_open.jpg'; }">
</div>
<div style="margin: 0px; padding:0px;">
<div style="display: none;">
<iframe title="YouTube video player" width="640" height="360" src="//www.youtube.com/embed/{vb:raw code}?wmode={vb:raw wmode}" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div>
Save and reload - I recommend you tick the "Save in Template History?" so you can undo any changes at a later date or if an mistake has happened.