Joomla! Discussion Forums



It is currently Fri Nov 27, 2009 9:34 pm (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 4 posts ] 
Author Message
Posted: Tue May 12, 2009 5:27 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Dec 04, 2008 11:11 pm
Posts: 10
Hello all,
I was wondering if anybody could help me with the coding, I am not a coder but can read and get through html and script just can't remember all the commands and rules. If you don't know what the konami code is, here is a description http://en.wikipedia.org/wiki/Konami_Code

here is the basic script:
Code:
<script type="text/javascript" src="http://konami-js.googlecode.com/svn/trunk/konami.js"></script>
              <script type="text/javascript">
   konami.code = function() {
      alert("Get excited for a horntastic time at the Mid-South Horn Workshop")
      }


Now I was wondering how I would make a picture pop up or something like that. Right now it is just a window with text. It shouldn't be difficult for someone that is smarter than me. I am learning html and the sort but this is a little beyond my limited knowledge at the moment.

Thanks in advance.

BTW, give this a shot in your site template for some nerdy goodness.


Top
  E-mail  
 
Posted: Wed May 13, 2009 8:21 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed May 13, 2009 8:10 am
Posts: 1
Hi,
I'm actually the guy who made that script - it's fun to see other people using it!

Why don't you try this:

Code:
<script type="text/javascript" src="http://konami-js.googlecode.com/svn/trunk/konami.js"></script>
<script type="text/javascript">
   konami.code = function() {
window.open('{image_url}','mywindow','width={image_width},height={image_height},left=0,top=100')     
}


Obviously replace {image_url} with the URL to the image you want. That might be the simplest one-line solution to what you're trying to do.

The example page I setup actually sort of does what you're describing:

http://www.snaptortoise.com/konami-js/

Try entering the Konami Code and you'll see an image fade in. It's a bit fancier than just calling alert() though and requires using jQuery, so this may not be ideal.


Top
  E-mail  
 
Posted: Wed May 13, 2009 2:48 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Dec 04, 2008 11:11 pm
Posts: 10
Thanks, I actually used that site to get used to know the basic code and stuff. very cool, very geeky. I was actually wanting to use something that uses kkeys

like this http://paulirish.com/2009/cornify-easter-egg-with-jquery/ but i don't have the knowledge to make it use different pictures, once I get started i am sure i can google my way through most of it. Thanks for the awesome script.


Top
  E-mail  
 
Posted: Sun Nov 01, 2009 10:10 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Feb 17, 2009 6:46 pm
Posts: 6
Ok i got it to work the way i want... ok 90% of the way i want it to.
Code:
<script type="text/javascript" src="http://konami-js.googlecode.com/svn/trunk/konami.js"></script>
<script type="text/javascript">
   konami.code = function() {
      alert("I will now take you back to OCT 31st!")
                window.location = 'http://domain.com/index.php?&template=hollween3'
      }
        konami.load()
</script>

but after they do that and head somewhere else they lose the template layout. how do i get it to remember the template it has changed to?
i should have posted this in 1.5.x i am sorry
*facepalm*


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group