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
  #12  
Old 03-05-2012, 12:21 AM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ellinofatsa View Post
hi can somewhane make this hack for ipbtoarcade?
I'm sure it has already been done by stangger5, I stopped using IPB years ago so I won't be releasing a version here. (It also works with xenForo Arcade).

If you are requesting it though you would be better posting a request in either the paid or unpaid requests forum
Reply With Quote
  #13  
Old 03-11-2012, 12:54 PM
team76 team76 is offline
 
Join Date: Jan 2007
Location: France - Le havre
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works great on vb4.1.10 but since 4.1.11
nothing

**********

sorry I was wrong I had deleted files
Reply With Quote
  #14  
Old 03-18-2012, 04:37 PM
Sarab Sarab is offline
 
Join Date: Oct 2007
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

Great way to play in the arcade, thank you =D

One question, is there a way to translate " LIGHT ON " and " LOGHT OFF "?

Best regards,
Sarab
Reply With Quote
  #15  
Old 03-18-2012, 06:21 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 Sarab View Post
Hello,

Great way to play in the arcade, thank you =D

One question, is there a way to translate " LIGHT ON " and " LOGHT OFF "?

Best regards,
Sarab
Sorry, the 'Lights On' and 'Lights Off' is embedded into the flash swf. What do you want it translated to and I'll see if it is possible to change
Reply With Quote
  #16  
Old 03-19-2012, 01:58 PM
Sarab Sarab is offline
 
Join Date: Oct 2007
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<font face="Tahoma">
Hello Gemma,

I see, I would like to translate it to Arabic where it will be:
LIGHT ON = إضاءة
LIGHT OFF = إطفاء الإضاءة

Can this be done =D?

Best Regards,
Sarab

</font>
Reply With Quote
  #17  
Old 03-19-2012, 02:51 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 Sarab View Post

Hello Gemma,

I see, I would like to translate it to Arabic where it will be:
LIGHT ON = إضاءة
LIGHT OFF = إطفاء الإضاءة

Can this be done =D?

Best Regards,
Sarab
Not sure if the translation has worked out right but try this. Replace the original Lights.swf with the one in this archive.

Edit: removed attachment
Reply With Quote
  #18  
Old 03-19-2012, 03:52 PM
Sarab Sarab is offline
 
Join Date: Oct 2007
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gemma View Post
Not sure if the translation has worked out right but try this. Replace the original Lights.swf with the one in this archive.
Thank you, I just tried it but it didn't work because of the Arabic words, so can you try putting those images instead:
LIGHT OFF:

LIGHT ON:


Best regards,
Sarab
Reply With Quote
  #19  
Old 03-19-2012, 04:30 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Couldn't use the images, but is this better?

edit: removed link
Reply With Quote
  #20  
Old 03-20-2012, 10:31 AM
Sarab Sarab is offline
 
Join Date: Oct 2007
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see ="(

Thank you, but it's looks like the words in mirrors + the Arabic characters should be connected to form a word =D

So how about the swf file be without the LIGHT ON & LIGHT OFF, just the light image =D?

Best Regards,
Sarab
Reply With Quote
  #21  
Old 03-20-2012, 03:34 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 Sarab View Post
I see ="(

Thank you, but it's looks like the words in mirrors + the Arabic characters should be connected to form a word =D

So how about the swf file be without the LIGHT ON & LIGHT OFF, just the light image =D?

Best Regards,
Sarab
There you go, I've removed the text for you.
Attached Files
File Type: zip Lights.zip (2.0 KB, 13 views)
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 03:18 PM.


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.04783 seconds
  • Memory Usage 2,347KB
  • Queries Executed 28 (?)
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
  • (5)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
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (4)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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