Back to vBulletin 4.x Add-ons

v3 Arcade Lights Out Mode
Mod Version: 1.0.2, by Gemma

vB Version: 4.x.x Rating: (3 votes - 3.67 average) Installs: 14
Released: 25 Oct 2011 Last Update: 11 Nov 2011 Downloads: 76
Not Supported Template Edits Additional Files Re-usable Code  

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>
Save the template.

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 -->
Replace that with:
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 -->
Still in v3ARCADE_PLAY find:
Code:
{vb:raw footer}
Below that add:
Code:
</div>
    </div>
    <div id="shadow"></div>
Save the template.

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

File Type: %1$s v3 Arcade Lights Out 1.0.2.zip (6.4 KB, 59 downloads)

Screenshots

Click image for larger version
Name:	lights.jpg
Views:	302
Size:	80.0 KB
ID:	134070   Click image for larger version
Name:	lights_out.jpg
Views:	185
Size:	27.2 KB
ID:	134071  

Similar Mods

Mini Mods Let your links' lights be on and off vBulletin 3.8 Template Modifications

vblts.ru supports vBulletin®, 2022-2024