The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
v3 Arcade Lights Out Mode Details »» | |||||||||||||||||||||||||||||||
I did this a long time ago, so I'd advise you to back up your v3ARCADE_PLAY template before you do anything else, just incase I've forgotten something
I released a simplified version of this to Premium Members on v3arcade.com, now here is the more advanced version. What Does This Do? Basically, when you turn lights down, the entire page darkens and let you play the game in the 'dark' which cuts out distractions. I've also added a section of code which will show a game description (if one is available) above the game instructions. Open your headinclude template and add: Code:
<vb:if condition="THIS_SCRIPT == 'arcade'"> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="js/lights.js"></script> <link rel="stylesheet" href="css/lights.css"/> </vb:if> In your v3ARCADE_PLAY template and find: Code:
<!-- main --> <div class="blockrow">{vb:raw flashcode}</div> <vb:if condition="$game['instructions']"> <div class="blockrow">{vb:raw game.instructions}</div> </vb:if> <!-- /main --> </td> <td valign="top" style="width: 200px; padding-left: 10px;"> <!-- right area --> Code:
<!-- main --> <div id="acontainer"> <div id="header"> <div id="command"><a class="lightSwitcher" href="javascript:foo();">Turn off the lights</a></div> </div> <div id="movie"> <div class="blockrow">{vb:raw flashcode}</div> <!-- /main --> <table width="700" border="0"> <vb:if condition="$game['description']"> <tr> <th scope="row"><span><b>Description:</b> {vb:raw game.description}<br/><br/></span></th> </tr> </vb:if> <vb:if condition="$game['instructions']"> <tr> <th scope="col"><span><b>Instructions:</b> {vb:raw game.instructions}</span></th> </tr> </vb:if> </table> </td> <td valign="top" style="width: 200px; padding-left: 10px;"> <!-- right area --> Code:
{vb:raw footer} Code:
</div> </div> <div id="shadow"></div> Upload the contents of the zip file to your server using your FTP css/lights.css js/lights.js images/arcade/light_bulb.png images/arcade/light_bulb_off.png images/arcade/shade5x5.png You can see a live demo in our arcade, play a game and click on 'Turn The Lights Off'. To upgrade from version 1.0.1 to version 1.0.2, unpack the archive and upload the files. No need to re-edit any templates Version History 1.0.1 - Initial release on vB.org 1.0.2 - Added new lights.css file If anyone wants to further develop any of my addons, you are free to do so. Download Now
Screenshots
Show Your Support
|
Comments |
#32
|
||||
|
||||
I have tried every suggestion, nothing works. Oh well
|
#33
|
|||
|
|||
Thanks Gemma, I have this working spot on in v3Arcade.
You may be interested to know that I also got this working in ibProArcade, the code is almost the same, *except* it wouldn't work in IE for reasons I can't fathom. But, it's fine in v3Arcade in IE. |
Благодарность от: | ||
Gemma |
#34
|
||||
|
||||
nice addition, thanks for sharing
|
#35
|
|||
|
|||
Managed to get this version working in IE ibProArcade.
Tip for anyone trying that: Instead of the footer instructions, add this to the copyright function in skin_arcade (or skin_v3arcade): Code:
$text = $text . "</div></div><div id='shadow'></div> "; |
#36
|
||||
|
||||
For ibproarcade,,I put
PHP Code:
PHP Code:
Thanks Gemma !! |
#37
|
||||
|
||||
Awesome, it works on an arcade it was not made for and I can't get it to work on the one it was written for.
|
#38
|
||||
|
||||
If you want me to have a go at installing it for you (or checking for conflicts) PM me a temporary admin account on your site and I'll have a look. Can't really say why its not working without testing.
|
#39
|
||||
|
||||
Should be working for you now
|
#40
|
|||
|
|||
you forgot my message :
https://vborg.vbsupport.ru/showpost....4&postcount=30 |
#41
|
||||
|
||||
Quote:
Go to AdminCP > Languages & Phrases > Phrase Manager Add two new phrases Phrase Type: Global Product: vBulletin Var Name: lights_on Text: Your translation of 'Turn The Lights On' Do the same but for lights_off Then in your v3ARCADE_PLAY find: Code:
<!-- main --> <div class="blockrow">{vb:raw flashcode}</div> <vb:if condition="$game['instructions']"> <div class="blockrow">{vb:raw game.instructions}</div> </vb:if> <!-- /main --> </td> <td valign="top" style="width: 200px; padding-left: 10px;"> <!-- right area --> Code:
<vb:if condition="THIS_SCRIPT == 'arcade'"> <script type="text/javascript"> $(document).ready(function(){ $("#shadow").css("height", $(document).height()).hide(); $(".lightSwitcher").click(function(){ $("#shadow").toggle(); if ($("#shadow").is(":hidden")) $(this).html("{vb:rawphrase lights_off}").removeClass("turnedOff"); else $(this).html("vb:rawphrase lights_on").addClass("turnedOff"); }); }); </script> </vb:if> <link rel="stylesheet" href="css/lights.css"/> <div id="acontainer"> <div id="header"> <div id="command"><a class="lightSwitcher" href="javascript:void(0)">{vb:rawphrase lights_on}</a></div> </div> <div id="movie"> <div class="blockrow">{vb:raw flashcode}</div> <!-- /main --> <table width="700" border="0"> <vb:if condition="$game['description']"> <tr> <th scope="row"><span><b>Description:</b> {vb:raw game.description}<br/><br/></span></th> </tr> </vb:if> <vb:if condition="$game['instructions']"> <tr> <th scope="col"><span><b>Instructions:</b> {vb:raw game.instructions}</span></th> </tr> </vb:if> </table> </td> <td valign="top" style="width: 200px; padding-left: 10px;"> <!-- right area --> Code:
{vb:raw footer} Code:
</div> </div> <div id="shadow"></div> Upload the lights.css file and the images, no need for the lights.js file or headinclude template edit. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|