Allegro.cc - Online Community

Allegro.cc Forums » Allegro.cc Comments » Allegro.cc Beep

This thread is locked; no one can reply to it. rss feed Print
Allegro.cc Beep
AMCerasoli
Member #11,955
May 2010
avatar

Hi there,

I don't know about you guys, but I'm kind addicted to allegro.cc... The first thing I do when I open the explorer is press the damn shortcut for allegro forums.

Well, that combined with libCurl, library that I have being studding these days, made me create a little application that play a sound each time a new post is... Posted... Sort of....

So the thing is, I haven't tested it on my webpage, to see if this increment the rank in Google Analytics, or create some fake results (I just finished).

I posted this to ask Matthew if I can use it, since the program make a request to the page each minute.

I sent you a PM months ago, to see if you could change my username (seems ppl get annoyed seeing my usern all upper case) but you didn't respond, maybe you don't use it or something like that... Anyway this time is a little bit more important, I just want to know if I can use it or if would be a problem... That's it...

Oh... here is a screenshot:

{"name":"603957","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/e\/5e385620e75ee0c718671465830b0636.jpg","w":972,"h":541,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/e\/5e385620e75ee0c718671465830b0636"}603957

Isn't incredible? the most difficult part was the 3D rendering.

And BTW... If you have the time I would like to have my usern like this AMCerasoli, otherwise to me isn't a problem.

Vanneto
Member #8,643
May 2007

I absolutely approve.
ed83057b3c88c9881aa1b73a44fa6cb5.png

In capitalist America bank robs you.

Matthew Leverton
Supreme Loser
January 1999
avatar

Polling the server once per minute doesn't really matter to me ... it's the same thing that the Recent Threads page does. But it doesn't make any sense to run it if you aren't at the computer.

That said, I think it would be more practical to tie it into the JavaScript that the Recent Threads page does. It would look something like as a custom a.cc user script:

#SelectExpand
1if (typeof RecentThreads != "undefined") 2{ 3 var foo = RecentThreads.rpcRefresh_onLoad; // link to original method 4 var new_ids = []; 5 6 RecentThreads.rpcRefresh_onLoad = function(transport) 7 { 8 foo(transport); // call original method 9 10 var ids = getNewIds(); 11 12 // if an element exists in ids that doesn't in new_ids, play a sound effect 13 14 new_ids = ids; 15 }; 16 17 document.observe('dom:loaded', function() 18 { 19 new_ids = getNewIds(); 20 }); 21 22 function getNewIds() 23 { 24 var ids; 25 26 $$(".brand-new") ... // iterate over these adding the thread ids to ids 27 // alternatively, use "new" for any thread that has a new reply 28 29 return ids; 30 } 31}

23yrold3yrold
Member #1,134
March 2001
avatar

Do what I do.

603959

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

AMCerasoli
Member #11,955
May 2010
avatar

@Matthew Leverton:
To be honest I don't know how to use "Theme & Behavior" in the control panel, but anyway I did it to practice with libCurl. But indeed that would be the most practical way.

@23yrold3yrold:
Hahahahah that's too funny man... Actually I was doing that... I want to check the page only when I'm sure there is a new post ;D

In the future I may improve it to play a sound only in determined threads.

Thanks!.

kenmasters1976
Member #8,794
July 2007

I don't know about you guys, but I'm kind addicted to allegro.cc...

I have a.cc as an App Tab in Firefox. The only other pinned tab I have is for the Allegro 5 user manual.

Go to: