I don't have any Daily Motion and Google videos on my site, could someone test this script for me? Thanks to Jeff I now know that this Mod works for YouTube, Google Video, and DailyMotion.
Turn Off the Lights Mod
Based off the Janko At Warp Speed Turn off the Lights Code:
http://www.jankoatwarpspeed.com/examples/TurnOffTheLights/Ported to PHP Director by:
FireDartWorks in these BrowsersFireFox 3.0.11
Opera 9.64
Safari 4
Google Chrome 2.0.172.33
IE 8
IE 7
Instructions:
1) Download the "turn_off_lights.zip" (or "turn_off_lights.7z" You need 7-Zip to extract) & Upload the "turn_off_lights" folder to your root(or where PHP Director is installed)
2) Place this code in your <head></head> Tags(Should be located in the header.tpl file)
<link href="turn_off_lights/style.css" rel="stylesheet" type="text/css" />
3) Place this at the bottom of your template but before the </body> and </html> Tags(Should be located in the "footer.tpl" file)
<div id="shadow"></div>
4) Place this code were you want the "Turn off the lights" Text & icon to go:
<script type="text/javascript" src="turn_off_lights/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="turn_off_lights/turn_off_lights.js"></script>
<a class="lightSwitcher" href="#">Turn off the lights</a>
NOTE: Step 4 you should look at the "viewvid.tpl" file. If your lazy and don't want to go thought the code just replace everything you see in the viewvid.tpl file with this:
{include file="header.tpl"}
{section name=video loop=$video}
<div align='center'>
{if $reject eq "1"}
{$LAN_26}
{/if}
<h2>{$video[video].name}</h2>
<script type="text/javascript" src="turn_off_lights/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="turn_off_lights/turn_off_lights.js"></script>
<p><b>{$LAN_36}:</b> {$video[video].creator} | <a class="lightSwitcher" href="#">Turn off the lights</a></p>
{include file="players.tpl"}<br />
{rating_bar units='5' id=$video[video].id}
<strong>{$LAN_35}:</strong>
<br />
<div id='description'>{$video[video].description}</div>
<br />
<b>{$LAN_32}: </b>{$video[video].views}
{/section}
</div>
{include file="footer.tpl"}If you use this method it means you have not altered the viewvid.tpl file for any other reason.
5)
THIS IS VERY IMPORTANT Replace the player.tpl file with this:
{if $vidtype eq "YouTube"}
<object width="425" height="350"><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/{if $video[video].file eq ""}{$videoid}{else}{$video[video].file}{/if}&autoplay=1" type="application/x-shockwave-flash" width="425" height="350"></embed></object>
{elseif $vidtype eq "GoogleVideo"}
<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId={if $video[video].file eq ""}{$videoid}{else}{$video[video].file}{/if}" flashvars=""> </embed>
{elseif $vidtype eq "dailymotion"}
<div><object width="425" height="335"><param name="movie" value="http://www.dailymotion.com/swf/{if $video[video].file eq ""}{$videoid}{else}{$video[video].file}{/if}"></param><param name="allowfullscreen" value="true"></param><embed src="http://www.dailymotion.com/swf/{if $video[video].file eq ""}{$videoid}{else}{$video[video].file}{/if}" type="application/x-shockwave-flash" width="425" height="334" allowfullscreen="true"></embed></object></div>
{else}
This video type is currently unsuppotred
{/if}
I am guessing you have not changed anything in the plater.tpl file if you do this!
What does the above do? It makes all Youtube videos hover over the shadow rather then under it!Download Here:http://www.box.net/shared/iipbxxbsyuHave Fun Turning Off the Lights!
-FireDart