![]() |
v3 Arcade Lights Out Mode
1 Attachment(s)
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 :o
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'"> In your v3ARCADE_PLAY template and find: Code:
<!-- main --> Code:
<!-- main --> Code:
{vb:raw footer} Code:
</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. |
Sorry, I had a bit of the code wrong. If you had already installed and it wasn't working, change the headinclude template to this:
Code:
<vb:if condition="THIS_SCRIPT == 'arcade'"> |
Updated the css file to fix a problem when viewing with Google Chrome. If you're updating, just replace the css file.
|
Installed, doesn't seem to work on Google Chrome. In fact, it doesn't work at all I'm afraid. I tried IE, FireFox and Chrome. None of them worked. I copy/pasted the exact lines as instructed.
|
Does the demo link work for you?
Can you PM me a link to your site so I can have a look |
Yea, demo works fine: http://forum.esforces.com
|
Try this,
In your v3ARCADE_PLAY template find: Code:
<!-- main --> Code:
<!-- main --> Code:
{vb:raw footer} Code:
</div> |
Doesn't work either I'm afraid. Makes the light button unclickable. Nothing happens. Not even the light text changes to on.
Btw, I know this is off-topic, but I've made a edit reply in the main arcade thread regarding new threads/replies on highscores ^^. |
Just below:
Code:
<vb:if condition="THIS_SCRIPT == 'arcade'"> Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> |
Nothing still I'm afraid, here's my play template:
Code:
{vb:stylevar htmldoctype} |
Strange, your template works perfectly on my site - are you running any javascript compressor on your site?
|
Not that I know off.. I can't find any plugins that use compression capabilities. Maybe a conflict with another plugin?
|
Could be, I'll put together a noConflict version and post it later
Edit: Try replacing the part between <!-- main --> and <!-- /main --> with this Code:
<!-- main --> |
Sorry mate, still doesn't work :(. I have to find the plugin that is causing this.
|
Quote:
http://www.v3arcade.com/forums/showthread.php?t=3952 I might go back and add some better visuals to that one when I get time at the weekend |
1 Attachment(s)
Started working on a new version at the weekend, still got some tweaking to do but I got distracted by Battlefield 3 :D
|
Looks actually pretty neat :)
|
Gemma, this is so kewl! I have tried the old and this new version and still cant get it to work.
|
Quote:
Code:
<vb:if condition="THIS_SCRIPT == 'arcade'"> |
Quote:
|
Quote:
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(unless you've removed the edits ofcourse). |
Kewl, hope the new version works for me. My members are gonna love this. I have some serious gamers on my site.
|
You do mean the headinclude for the forum not the arcade_headinclude right?
|
Quote:
|
Still not working for me.
|
check whether you are already using a jquery file on your server and if you do include it above the code Gemma provided. Loading multiple jquery files on the same site does break the jquery functionality in many cases.
You could try to remove the jquery line and try this codeblock instead: Code:
<vb:if condition="THIS_SCRIPT == 'arcade'"> |
Quote:
|
how do i translate it to heb? i try to translate the words in js file but it didn't show good.
|
Quote:
in the v3Arcade_PLAY template edit Code:
<div id="command"><a class="lightSwitcher" href="javascript:foo();">Turn off the lights</a></div> Code:
$(this).html("Turn off the lights").removeClass("turnedOff"); |
Quote:
|
I have tried every suggestion, nothing works. Oh well
|
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. |
nice addition, thanks for sharing :)
|
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> "; |
For ibproarcade,,I put
PHP Code:
PHP Code:
Thanks Gemma !! |
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. :(
|
Quote:
|
Quote:
|
you forgot my message :
https://vborg.vbsupport.ru/showpost....4&postcount=30 |
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 --> Code:
<vb:if condition="THIS_SCRIPT == 'arcade'"> Code:
{vb:raw footer} Code:
</div> Upload the lights.css file and the images, no need for the lights.js file or headinclude template edit. |
All times are GMT. The time now is 03:01 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|