Author Topic: phonelosers.org Pay Phone Menu  (Read 6696 times)

Offline rbcp

  • Head Custodian
  • Administrator
  • Ninja Phone Loser
  • *****
  • Posts: 5259
  • 1337 13V3L: +454/-81
  • I'm not stupid! I'm not stupid! Hematology!
    • Homepage
phonelosers.org Pay Phone Menu
« on: May 29, 2011, 05:34:11 PM »
Earlier this month I modified the sidebar on phonelosers.org to look like a giant, ugly pay phone.  Today I moved the drop down javascript menu into the pay phone so that hovering over pay phone buttons brings up menu options.  Can you all test it out and tell me if it works for you, if it's unbearably slow or if you hate it because it sucks.  I think I'm going to make the buttons make touch tone sounds when they're pressed.

Offline markov

  • Cactus Zombie
  • *****
  • Posts: 391
  • 1337 13V3L: +16/-1
  • The mgt.
    • chowdersploitation
Re: phonelosers.org Pay Phone Menu
« Reply #1 on: May 30, 2011, 04:09:15 AM »
The only thing that threw me off a bit was not being able to just click the button to go to the specified section. Like clicking on 9/Forum doesn't go to the forums, you have to actually select a menu option from the pop up

Pretty creative idea though
my prankcalls: chowdersploitation

Offline nyphonejacks

  • PLA Corporate Drone
  • *****
  • Posts: 435
  • 1337 13V3L: +22/-5
    • nyphonejacks
Re: phonelosers.org Pay Phone Menu
« Reply #2 on: May 30, 2011, 05:54:29 PM »
same thing that i was thinking.. but perhaps having the DTMF tones play when you press one of the numbers might distract enough so that it is not much of a big deal

Offline kuraz

  • Senior Phone Loser
  • **
  • Posts: 53
  • 1337 13V3L: +3/-0
  • Low-level employee
Re: phonelosers.org Pay Phone Menu
« Reply #3 on: June 04, 2011, 04:01:08 AM »
it sucks on my computer, like tinychat. and it's not compatible with links.

Offline blahblahblah

  • Newb
  • *
  • Posts: 7
  • 1337 13V3L: +0/-0
  • Orthogonal-level employee
Re: phonelosers.org Pay Phone Menu
« Reply #4 on: June 04, 2011, 05:28:37 AM »
Why don't the buttons make tones when i click them? Or is my volume turned down...

Offline kuraz

  • Senior Phone Loser
  • **
  • Posts: 53
  • 1337 13V3L: +3/-0
  • Low-level employee
Re: phonelosers.org Pay Phone Menu
« Reply #5 on: June 04, 2011, 08:10:49 AM »
Why don't the buttons make tones when i click them? Or is my volume turned down...
You are supposed to dial the number on your rotary phone. This will connect you to rbcp who will dutifully whistle the appropriate mf tones for you.

Offline rbcp

  • Head Custodian
  • Administrator
  • Ninja Phone Loser
  • *****
  • Posts: 5259
  • 1337 13V3L: +454/-81
  • I'm not stupid! I'm not stupid! Hematology!
    • Homepage
Re: phonelosers.org Pay Phone Menu
« Reply #6 on: June 04, 2011, 10:05:07 AM »
it sucks on my computer, like tinychat. and it's not compatible with links.

What do you mean by not compatible with links?

And yes, I do need to make them play touch tones when pressed.  The code to do that should be minimal.

Offline kuraz

  • Senior Phone Loser
  • **
  • Posts: 53
  • 1337 13V3L: +3/-0
  • Low-level employee
Re: phonelosers.org Pay Phone Menu
« Reply #7 on: June 04, 2011, 10:37:24 AM »
I was afraid that i had to clarify that of course i mean http://en.wikipedia.org/wiki/Links_(web_browser)

Offline markov

  • Cactus Zombie
  • *****
  • Posts: 391
  • 1337 13V3L: +16/-1
  • The mgt.
    • chowdersploitation
Re: phonelosers.org Pay Phone Menu
« Reply #8 on: June 04, 2011, 12:19:15 PM »
Never heard of that browser before.. looks like it could be useful at times
my prankcalls: chowdersploitation

Offline rbcp

  • Head Custodian
  • Administrator
  • Ninja Phone Loser
  • *****
  • Posts: 5259
  • 1337 13V3L: +454/-81
  • I'm not stupid! I'm not stupid! Hematology!
    • Homepage
Re: phonelosers.org Pay Phone Menu
« Reply #9 on: June 04, 2011, 07:45:39 PM »
I just stole some touch tone sounds from Jenn's site and added touch tones to the pay phone menu.  Clicking now makes DTMF.  The code is tiny and the sound only load when the buttons are pressed, so it shouldn't affect the page's load time.  Only drawback is that the tones are slightly delayed from when you press a button, because the sounds have to load first.

Offline blahblahblah

  • Newb
  • *
  • Posts: 7
  • 1337 13V3L: +0/-0
  • Orthogonal-level employee
Re: phonelosers.org Pay Phone Menu
« Reply #10 on: June 05, 2011, 03:38:03 AM »
Touch tones are what I was waiting for....

Offline kuraz

  • Senior Phone Loser
  • **
  • Posts: 53
  • 1337 13V3L: +3/-0
  • Low-level employee
Re: phonelosers.org Pay Phone Menu
« Reply #11 on: June 05, 2011, 04:11:35 AM »
Touch tones are what I was waiting for....
I would prefer rotary phone pulses. Were there ever rotary payphones in the usa?

Offline rbcp

  • Head Custodian
  • Administrator
  • Ninja Phone Loser
  • *****
  • Posts: 5259
  • 1337 13V3L: +454/-81
  • I'm not stupid! I'm not stupid! Hematology!
    • Homepage
Re: phonelosers.org Pay Phone Menu
« Reply #12 on: June 11, 2011, 02:32:04 PM »
I would prefer rotary phone pulses. Were there ever rotary payphones in the usa?

By the time I got into pay phones in the 80's, they were mostly all touch tone phones, but rotary phones could still be found occasionally.  They were just as red boxable as the touch tone pay phones.

On that pay phone menu - I should make it dialable.  Like if you dial certain combinations, it takes you to secret pages or it plays a recording.  I think that's beyond my coding capability, but it sure would be cool.

Offline kuraz

  • Senior Phone Loser
  • **
  • Posts: 53
  • 1337 13V3L: +3/-0
  • Low-level employee
Re: phonelosers.org Pay Phone Menu
« Reply #13 on: June 11, 2011, 05:56:37 PM »
I would prefer rotary phone pulses. Were there ever rotary payphones in the usa?
On that pay phone menu - I should make it dialable.  Like if you dial certain combinations, it takes you to secret pages or it plays a recording.  I think that's beyond my coding capability, but it sure would be cool.

That would be awesome!

Offline Godot

  • Go away, PLA!
  • PLA Corporate Drone
  • *****
  • Posts: 427
  • 1337 13V3L: +34/-7
    • Godot's Website
Re: phonelosers.org Pay Phone Menu
« Reply #14 on: June 13, 2011, 02:32:22 PM »
You should move the onClick property from the <a> tags to the <td> tags. That way it will work no matter where you click on the button. Right now you
have to click the text or it won't work.

And here is my attempt at JavaScript to make the phone dialable. You just replace the onClick calls to playSound with calls to this, like buttonPress('1') or buttonPress('star'). The numbers array sets what JavaScript to run for what number.

Code: [Select]
function buttonPress(button) {
var numbers = [
["123", "alert('pla');"],
["321", "window.location = 'http://www.google.com/';"],
["s69", "playSound('http://www.phonelosers.com/media/tps/thephoneshow.2011-05-31.mp3')"],
]
playSound("http://www.phonelosers.org/media/touchtones/dtmf-"+button+".mp3");
var maxDigits = 0;
for (var i = 0; i < numbers.length; i++)
if (maxDigits < numbers[i][0].length) maxDigits = numbers[i][0].length;
button = button.substring(0,1);
buttons = readCookie("payphone_dialed");
if (buttons == null) buttons = "";
buttons += button;
if (buttons.length > maxDigits) buttons = buttons.substr(buttons.length - maxDigits);
createCookie("payphone_dialed", buttons, 1);
buttons = buttons.toUpperCase();
for (var i = 0; i < numbers.length; i++)
if (buttons.indexOf(numbers[i][0].toUpperCase()) >= 0) {
eraseCookie("payphone_dialed");
setTimeout(numbers[i][1], 2600);
}
}

function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

function eraseCookie(name) {
createCookie(name,"",-1);
}
"I bought a cactus and it died a week later... I was really depressed, I thought, 'Damn, I am less nurturing than a desert.'" -Demetri Martin