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
  #22  
Old 03-24-2012, 05:30 AM
Sarab Sarab is offline
 
Join Date: Oct 2007
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gemma View Post
There you go, I've removed the text for you.
Sorry for being late >.<

I want to say thank you, you were really great help and I'm grateful to you T.T

It worked perfect, thanks again for the help =D

Best Regards,
Sarab
Reply With Quote
  #23  
Old 05-09-2012, 01:48 PM
datoneer datoneer is offline
 
Join Date: Jul 2011
Posts: 453
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Noerenberg View Post
hi,

i am not sure what i do wrong but on my site the hole site goes white
Just replace #fff with #000 and you will get what you want
Reply With Quote
  #24  
Old 05-12-2012, 09:26 PM
C.Birch C.Birch is offline
 
Join Date: Apr 2002
Posts: 459
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by datoneer View Post
Just replace #fff with #000 and you will get what you want
Is problem is the same as i get in firefox, it blacks or whites (going by the colour you set) all the page apart from the lights button, what means you can not see or interact with the flash game when you use the lights out mode.

This seems to be a z-index problem to me, with the flash game needing a index number higher that the one used for the lights out mode.
Reply With Quote
  #25  
Old 05-12-2012, 09:58 PM
C.Birch C.Birch is offline
 
Join Date: Apr 2002
Posts: 459
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the fix:
In your v3ARCADE_PLAY do the following edits.

Below:
Quote:
#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: #000000; /* 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 */
}
Add:
Quote:
#standout{
position:relative;
background-color:#ffffff;
z-index:1000;
}
Below:
Quote:
<td align="center" class="blockbody" valign="top">
<!-- main -->
Add:
Quote:
<div id = "standout">
Above:
Quote:
<!-- /main -->
</td>
Add:
Quote:
</div>
Now save the edits.
Reply With Quote
Благодарность от:
Gemma
  #26  
Old 05-13-2012, 12:23 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Update to version 2.0.1 with the above fix. If you're updating, follow the instructions in the post above (#24); these instructions have been included in the OP for those who are installing from scratch.
Reply With Quote
  #27  
Old 02-15-2013, 09:31 PM
hunter1985 hunter1985 is offline
 
Join Date: Oct 2012
Location: Dundee, Scotland
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That looks brill! Nice addon lassie!
Reply With Quote
  #28  
Old 04-25-2013, 04:18 PM
doctorsexy's Avatar
doctorsexy doctorsexy is offline
 
Join Date: Mar 2011
Location: earth
Posts: 383
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works well with Xf....
Reply With Quote
  #29  
Old 06-02-2013, 10:16 AM
initiald initiald is offline
 
Join Date: Mar 2012
Posts: 98
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

NVM. Just change the number.
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 05:26 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07255 seconds
  • Memory Usage 2,336KB
  • 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
  • (9)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
  • (9)post_thanks_box
  • (3)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (3)postbit_attachment
  • (9)postbit_onlinestatus
  • (9)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