![]() |
Konami Code Install
1 - You need a link to jQuery. My Bootstrap theme comes with it. If you don't have it, hop into **root**/templates/**your theme**/template.tpl and before </body>, add this: HTML Code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> HTML Code:
;(function( $, window, document, undefined){ HTML Code:
<script src="{$home}js/jQuery_konami_code.js"></script> HTML Code:
<script type="text/javascript"> This code is now operational on every page in your site. As a reminder, the Konami Code is up, up, down, down, left, right, left, right, b, a. For some further reading on how this code can be modified, check out the github repository for it. |
I'm curious how I would alter the message. I want it to appear like this:
Congratulations! You've discovered the Promo Code for the: Konamibunny Code: PROMOCODEHERE Enter it on the Promo Code page: http://chibifurs.elementfx.com/promo It would be awesome if it played a defined sound as the box pops up too. If possible, what format would the sound need to be in and how long? Is it also possible to alter the code so only members can enter the code and not a guest or nonlogged user? |
Promo codes can already only be entered by logged in users. A non-logged in member would be able to press the sequence of keys to display the alert, but they probably would not know to, nor is there any harm in letting them...?
To change the text in the alert prompt, simply follow the instructions already given and replace the word 'yay!'. Alert prompts cannot be styled in any way. If you want to pop up a div and have it styled with css instead, learn Javascript or jQuery. Or, if you're using Bootstrap already, perhaps install and learn to use Bootbox.js. If you want to play a sound, here's the top result I got from Google. |
I've managed to at least put each piece on its own line via MANY spaces so yay! I'll make an attempt with the sound later.
|
All times are GMT -5. The time now is 09:50 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.