Re: Show currently playing song in signature/some talk about music & sigs

I'm not compiling PHP5 unless I need it.

I'm using something else

Re: Show currently playing song in signature/some talk about music & sigs

I wish it could put in the ú when needed instead of a .

Re: Show currently playing song in signature/some talk about music & sigs

shinko_metsuo wrote:

I'm not compiling PHP5 unless I need it.

I'm using something else

i don't understand, you don't need php5 do you?

Re: Show currently playing song in signature/some talk about music & sigs

I have like php 4.3.* and the code that was given to me gave me the "call to an undifined function" error

Re: Show currently playing song in signature/some talk about music & sigs

You'd need GD support to make the image, it doesn't require PHP5.

Re: Show currently playing song in signature/some talk about music & sigs

since i am awesome, i also have a now playing bit, i might make it 50/50 with random quotes or whatever if i can be bothered, btw sorry to everyone who doesn't use a light coloured theme i bet it looks pretty dodgy on them wink

32

Re: Show currently playing song in signature/some talk about music & sigs

Connor, I've been noticing your sig and also the one Jansson uses on punres.

Is this a php file that generates a png on the fly?

Re: Show currently playing song in signature/some talk about music & sigs

yeh, i know i should probably cache it but yeh its generated on the fly, and as soon as i made it Jansson stole my idea tongue

if i was less lazy i'd probably make it more interesting, but atm the only randomness is the colour of the stats

Re: Show currently playing song in signature/some talk about music & sigs

Maybe make the background transparent? Oh, and is the font Trechbuchet MS?

Re: Show currently playing song in signature/some talk about music & sigs

well i dunno what GD does with transparency and IE certainly doesn't like alpha transparency (which would be amazing if i could use it)

and no the font is called LondonBetween its just a nice clean looking font that looks ok small

36 (edited by scottywz 2005-06-18 22:50)

Re: Show currently playing song in signature/some talk about music & sigs

I think Tahoma looks okay at 8px, as long as it's antialiased if used by GD and some other programs.

Re: Show currently playing song in signature/some talk about music & sigs

i wanted something that other people didn't have (but not too crazy)

Re: Show currently playing song in signature/some talk about music & sigs

i've just improved mine slightly, it says now playing if the song appeared in the last 10 min and Last Played if its older smile

Re: Show currently playing song in signature/some talk about music & sigs

Now I'm thinking of putting the quotes in a DB and having the script choose a random one each time.

Re: Show currently playing song in signature/some talk about music & sigs

I'm personally for a minimal effect, which is why I use a tiny test script that shows the last 3 (two currently...I'll change that sometime this weekend...It used to be ten.) songs played.

scottywz- Wow...That sig is getting bigger every time I see it.

Re: Show currently playing song in signature/some talk about music & sigs

I wrote:

Now I'm thinking of putting the quotes in a DB and having the script choose a random one each time.

Instead of that, I have the quotes assigned to variables. Is there any way that PHP can use a random variable (out of, let's say, $q1 and $q2)?

Re: Show currently playing song in signature/some talk about music & sigs

use $q[1] $q[2] etc then do $q[rand(1,10)] replace the 10 with the number of quotes

43 (edited by scottywz 2005-06-27 17:42)

Re: Show currently playing song in signature/some talk about music & sigs

Thanks. Now, if only I can get it to quit displaying as a 7 x 8 white box sometimes.

Re: Show currently playing song in signature/some talk about music & sigs

Yeah - that's all I see.

Re: Show currently playing song in signature/some talk about music & sigs

Well, sometimes, it does that. I don't know why. hmm

Re: Show currently playing song in signature/some talk about music & sigs

scottywz you should look at making your signature cache itself, its REALLY slow for me, rather annoying since it loads about 3 min after the rest of the page and makes everything move

47 (edited by scottywz 2005-06-28 20:27)

Re: Show currently playing song in signature/some talk about music & sigs

Will be done in ~1 minute.

Edit: Done. Also added another quote.

48 (edited by scottywz 2005-06-29 01:12)

Re: Show currently playing song in signature/some talk about music & sigs

To get a random quote without looking at my signature, go:
Random Quote
Random Quote (no title)
All Quotes (see below)
or All Quotes (no title) (see below)

In the query string, you can put in ?action=all_quotes and it will dump all the quotes. One problem: It does the same thing as ?action=random_quote which I have that way because, with variables $q[1], $q[2], etc., I want to display all those variables (they contain ^the quotes), but I don't know how. How do I get it to do that?

The code I have now is:

<?php 

/* A Huge Comment */ 

/* Start App */ 

$nlt = "\n";

/*                      Define quotes                      */
/***********************************************************/
/* (Use ".$nlt at the end of each string except the last.) */

    /* Quote 1 */
    $q1t1 = "\"You know I was thinking hype could really help you, Harold. You're hyper now, so just".$nlt;
    $q1t2 = "back off one letter, and you're there.\" - Red, The Red Green Show";
    $q[1] = $q1t1.$q1t2;

    /* Quote 2 */
    $q2t1 = "\"It's the Possom Lodge Word Game. You know everybody dreams about a two-week vacation".$nlt;
    $q2t2 = "in Hawaii. Well, now you can do more than just dream about it! Ha-ha! Now, you can sit".$nlt;
    $q2t3 = "down and plan it out on your brand new pad of paper!\" - Harold, The Red Green Show";
    $q[2] = $q2t1.$q2t2.$q2t3;

    /* Quote 3 */
    $q3t1 = "\"Can you hear me? Am I talking?\" - Red, The Red Green Show".$nlt;
    $q3t2 = "(After shooting holes inside his Possum van with the doors shut.)";
    $q[3] = $q3t1.$q3t2;

    /* Quote 4 */
    $q4t1 = "\"BOBBY, EAT YOUR CHICKEN!\" - Peggy, King of the Hill".$nlt;
    $q4t2 = "(After being angry at someone else.)";
    $q[4] = $q4t1.$q4t2;

    /* Quote 5 */
    $q5t1 = "Red: \"... This week, we got some good news, got some bad news.\"".$nlt;
    $q5t2 = "Harold: \"What's the bad news?\"".$nlt;
    $q5t3 = "Red: \"Meet my nephew, Harold. And, now, the good news....\"".$nlt;
    $q5t4 = "- Dialog from \"The Group Photo Project\", The Red Green Show";
    $q[5] = $q5t1.$q5t2.$q5t3.$q5t4;

/* End Define Quotes */

$st = $q[rand(1,5)].$nlnt; // The number after the comma should be replaced the number of quotes defined above

/* Don't mod past here unless you know the risks. */

$action = isset($_GET['action']); 

if (!$action) { 

$action = ""; 

} 

else { 

$action = $_GET['action']; 

} 

$title = isset($_GET['html_title']); 

if (!$title) { 

$title = ""; 

} 

else { 

$title = $_GET['html_title']; 

} 

/* If $title == 'yes' or undefined */

if ($action == 'random_quote' && !$title) {
header("Expires: Thu, 04 Jul 1776 00:00:00 GMT");              //
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); //
header("Cache-Control: no-store, no-cache, must-revalidate");  // We don't want it cached. And, yes, the Declaration of Independence was signed on a Thursday.
header("Cache-Control: post-check=0, pre-check=0", false);     //
header("Pragma: no-cache");                                    //
echo '<title>Random Quote</title>'."\n\n".'<pre>'.$st.'</pre>'; // Where's the quote?
}

else if ($action == 'all_quotes' && !$title) {
header("Expires: Thu, 04 Jul 1776 00:00:00 GMT");              //
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); //
header("Cache-Control: no-store, no-cache, must-revalidate");  // We don't want it cached. And, yes, the Declaration of Independence was signed on a Thursday.
header("Cache-Control: post-check=0, pre-check=0", false);     //
header("Pragma: no-cache");                                    //
echo '<title>All Quotes</title>'."\n\n".'<pre>'.$st.'</pre>'; // Where's the quote? // The All Quotes feature is not available yet.
} 

else if ($action == 'random_quote' && $title == 'yes') {
header("Expires: Thu, 04 Jul 1776 00:00:00 GMT");              //
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); //
header("Cache-Control: no-store, no-cache, must-revalidate");  // We don't want it cached. And, yes, the Declaration of Independence was signed on a Thursday.
header("Cache-Control: post-check=0, pre-check=0", false);     //
header("Pragma: no-cache");                                    //
echo '<title>Random Quote</title>'."\n\n".'<pre>'.$st.'</pre>'; // Where's the quote?
}

else if ($action == 'all_quotes' && $title == 'yes') {
header("Expires: Thu, 04 Jul 1776 00:00:00 GMT");              //
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); //
header("Cache-Control: no-store, no-cache, must-revalidate");  // We don't want it cached. And, yes, the Declaration of Independence was signed on a Thursday.
header("Cache-Control: post-check=0, pre-check=0", false);     //
header("Pragma: no-cache");                                    //
echo '<title>All Quotes</title>'."\n\n".'<pre>'.$st.'</pre>'; // Where's the quote? // The All Quotes feature is not available yet.
}

/* If $title == 'no' */ 

else if ($action == 'random_quote' && $title == 'no') {
header("Expires: Thu, 04 Jul 1776 00:00:00 GMT");              //
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); //
header("Cache-Control: no-store, no-cache, must-revalidate");  // We don't want it cached. And, yes, the Declaration of Independence was signed on a Thursday.
header("Cache-Control: post-check=0, pre-check=0", false);     //
header("Pragma: no-cache");                                    //
echo '<pre>'.$st.'</pre>'; // Where's the quote?
}

else if ($action == 'all_quotes' && $title == 'no') {
header("Expires: Thu, 04 Jul 1776 00:00:00 GMT");              //
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); //
header("Cache-Control: no-store, no-cache, must-revalidate");  // We don't want it cached. And, yes, the Declaration of Independence was signed on a Thursday.
header("Cache-Control: post-check=0, pre-check=0", false);     //
header("Pragma: no-cache");                                    //
echo '<pre>'.$st.'</pre>'; // Where's the quote? // The All Quotes feature is not available yet.
} 

/* End App */ 

?>

where /* A Huge Comment */ is, well, a huge comment.

Also html_title can be in the query string, but is optional. If it's not there or set to yes it will add an HTML <title> </title> to the output. If it's set to no it won't.

Re: Show currently playing song in signature/some talk about music & sigs

I'm still getting the wierd square.

50 (edited by scottywz 2005-06-29 03:23)

Re: Show currently playing song in signature/some talk about music & sigs

Funny. Do you ever get something like

Red: "... This week, we got some good news, got some bad news."
Harold: "What's the bad news?"
Red: "Meet my nephew, Harold. And, now, the good news...."
- Dialog from "The Group Photo Project", The Red Green Show

:  (Updated every 15 seconds) Currently listening to this song / Last song listened to was:
Solas - Pastures of Plenty