Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
v3 Arcade - Lights Out Mode v2 Details »»
v3 Arcade - Lights Out Mode v2
Version: 2.0.1, by Gemma Gemma is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.x.x Rating:
Released: 01-20-2012 Last Update: 05-12-2012 Installs: 19
Template Edits
Re-useable Code Additional Files  
No support by the author.

What Does This Do?
Basically, when you turn lights down, the entire page darkens* and lets you play the game in the 'dark' which cuts out distractions.

*You can also change the fade background colour to match that of your forum and blank everything out except the game.

Upload the contents of the zip file to your forum root

In your v3ARCADE_PLAY template and find:

Code:
<title>{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}} - {vb:raw vboptions.arcadename} - {vb:raw game.title}</title>
{vb:raw headinclude_bottom}
</head>
Underneath that add:
Code:
<style type="text/css">
        #lights { /* This is the container which holds the light switch */
            position:relative; /* Set the position of the light switch to relative so it can be placed above the "dimming" layer */
            z-index:500; /* Set the height on the Z axis to 500 which is above the "dimmed" layer */
        }
 
        object { /* The object tag is what the swf files are held in */
            outline:none; /* Set the outline of swf objects to none so when you click on it you don't get a border around the swf */
        }
 
        #fade { /* This is the "dimmed" layer which fades in when the lights go off */
            display: none; /* Set the display to none which hides the layer */
            background: #fff; /* Set the color to black */
            position: fixed; left: 0; top: 0; /* Set the position to fixed so when the user scrolls it stays with them */
            width: 100%; height: 100%; /* Set the width and height to 100% of the browser window */
            opacity: .90; /* Set the layer's opacity to .90 which is 90% */
            z-index:100; /* Set the height on the Z axis to 100 which is below the "light switch" layer */
        }
#standout{
 position:relative;
background-color:#ffffff;                  
 z-index:1000;
}
    </style>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
    var flashvars = false;
 
    var params = {
        movie: "Lights.swf",
        quality: "high",
        allowScriptAccess: "always",
        wmode: "transparent"
    };
 
    var attributes = false;
 
    swfobject.embedSWF("Lights.swf", "lights", "100", "100", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript">
    function lightsOn(){
        //When you turn the lights back on fade out the "dim" layer over 500 milliseconds and then remove it
        $('#fade').fadeOut(500,function() { $("#fade").remove(); });
    };
 
    function lightsOff(){
        $('body').append('<div id="fade"></div>'); //When you turn the lights off add the "dimmed" layer to the page
        $('#fade').fadeIn(250); //Fade in the "dim" layer over 250 milliseconds
    };
</script>
You can change background: #fff; /* Set the color to black */ to match the colour of your forum if you'd prefer that to black and the opacity: .90; /* Set the layer's opacity to .90 which is 90% */ to suit your needs.

Still in the v3ARCADE_PLAY template find:
Code:
<td align="center" class="blockbody" valign="top">
            <!-- main -->
Below that add:
Code:
<div id = "standout">
Next, find:
Code:
<!-- /main -->
        </td>
Above that add:
Code:
</div>
Search for:
Code:
</div>
            </div>
            <!-- /right area-->
Above that add:
Code:
<div class="blockrow" align="center">
<div id="lights"></div>
Save the template.

Thanks goes to C.Birch for pointing out and providing a fix that some people were experiencing where upon pressing the lights out button the whole screen was dimming including the flash game. The required changes can be seen here and have been integrated into the instructions above.

*Nothing has changed in the zip archive, no need to download if upgrading, just carry out the template edits

Download Now

File Type: zip v3 Arcade - Lights Out Mode v2.0.1.zip (8.4 KB, 69 views)

Screenshots

File Type: jpg lights_on.jpg (72.3 KB, 0 views)
File Type: jpg lights_out.jpg (51.2 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
nacaruncr, tbworld

Comments
  #2  
Old 01-21-2012, 02:09 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reserved

Reply With Quote
2 благодарности(ей) от:
Juggernaut, kylek
  #3  
Old 01-22-2012, 07:40 PM
kylek kylek is offline
 
Join Date: Oct 2003
Location: British Columbia, Canada
Posts: 798
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Once again, thank you very much Gemma for this updated version, worked great right from the start!
Reply With Quote
Благодарность от:
Gemma
  #4  
Old 01-22-2012, 07:51 PM
thecore762 thecore762 is offline
 
Join Date: Jul 2008
Posts: 510
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome plugin!
Reply With Quote
  #5  
Old 01-23-2012, 11:02 AM
wolfsblut01 wolfsblut01 is offline
 
Join Date: Sep 2010
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

klasse, danke dir
Reply With Quote
  #6  
Old 03-01-2012, 06:41 PM
Noerenberg Noerenberg is offline
 
Join Date: Mar 2009
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi,

i am not sure what i do wrong but on my site the hole site goes white
Attached Images
File Type: jpg Screenshot_3.jpg (16.5 KB, 0 views)
Reply With Quote
  #7  
Old 03-01-2012, 06:45 PM
Noerenberg Noerenberg is offline
 
Join Date: Mar 2009
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, it works in Firefox but not in Opera.

Can you fix the problem in the browser Opera?
Reply With Quote
  #8  
Old 03-02-2012, 04:16 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Noerenberg View Post
Ok, it works in Firefox but not in Opera.

Can you fix the problem in the browser Opera?
I'll have a look but I can't guarantee I'll get it working, I don't use Opera or know the ins and outs of how it works. No idea what needs to be done differently so I'll need to do some research
Reply With Quote
  #9  
Old 03-02-2012, 04:37 PM
Noerenberg Noerenberg is offline
 
Join Date: Mar 2009
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gemma View Post
I'll have a look but I can't guarantee I'll get it working, I don't use Opera or know the ins and outs of how it works. No idea what needs to be done differently so I'll need to do some research
Thanks Gemma, i will wait, no problem
Reply With Quote
  #10  
Old 03-04-2012, 12:51 AM
ellinofatsa ellinofatsa is offline
 
Join Date: Mar 2010
Posts: 348
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi can somewhane make this hack for ipbtoarcade?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:51 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04393 seconds
  • Memory Usage 2,339KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (5)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (4)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete