I was going through my quotes trying to come up with idea for the next t-shirt, when I had the idea to put them in a list with a link to the post they came from. So now, at the top of the page, there will be random quotes from my posts. Since I just thought of it last night, I only have 28 right now, but, as soon as I have time, I’ll add so many that you’ll never be able to see them all, no matter how much you reload. Muh ha ha ha!
I have a few problems, though. I don’t know how to put regular quotes (“) in those quotes and have to use single quotes instead. Also, as has been a problem with my page for a long time, the color for links is just to dark to go against the blackground. I just don’t know how to use one color for in the post and another for on the sidebar. Anyone know a line I can add to this part to separately set the link color for my sidebar?
.side {
font-family:verdana, arial, sans-serif;
color:#555;
font-size:12px;
font-weight:normal;
background:#000;
line-height:14px;
padding:2px;
}
Anyhoo, if you want quotes on your site you can add this to your template:
<script type=”text/javascript” src=”http://www.imao.us/docs/quotes.txt”></script>
UPDATE: Got answers to most my questions, but I really need to find out how to change the link color for just my sidebar; that’s a problem that plagued my website for sometime now.

Yeah I noticed this last night while you were still working on it and made a few adjustments to it, but by the time I had finished and emailed it to you, you had updated and fixed the script so that you didn’t need my fix.
Luckily the email bounced due to the attachment being a .js file (the default javascript format) so I didn’t embarrass myself.
If you’re interested I can make you one which is easier to update than the one you have now.
To use quotation marks inside of a string you have to escape them.
var text = “He said, \”Hello.\””;
alert(text);
would print
->He said, “Hello.”Yeah I noticed this last night while you were still working on it and made a few adjustments to it, but by the time I had finished and emailed it to you, you had updated and fixed the script so that you didn’t need my fix.
Luckily the email bounced due to the attachment being a .js file (the default javascript format) so I didn’t embarrass myself.
If you’re interested I can make you one which is easier to update than the one you have now.
To use quotation marks inside of a string you have to escape them.
var text = “He said, \”Hello.\””;
alert(text);
would print
->He said, “Hello.”<-
Typing html.
That’ll answer the last question.
You could probably get double-quotes into your random quotes by using " Like this:
text[1] = “My friend Charlie O’Toole said "Hello".“;
But a better solution is to probably put the entire text block into single-quotes (instead of double-quotes), then just precede a single-quote with a backslash whenever you need an actual single-quote character. Like this:
text[1] = ‘My friend Charlie O\’Toole said “Hello”.‘;
Thanks for those answers. Now I just need to figure out the link color problem.
You’re welcome. I’m sure you’ll repay the kindness someday.
I will Earl. I will.
I believe if you change color: to font-color: that should do it.
IkkonoIshi,
BTW, I would be interested in anything that easier. It doesn’t seem that hard as it is now, though.
This is probably completely unrelated, but my daughter told me today was “Nerd Day” at school.
Chack your email – I sent you something like this:
Use your .side class to further specify your anchor tag attributes. You may have to include a class=”side” in your a tags but something like this should work:
a.side
{
color: #000080;
background: #ffffff;
text-decoration: underline;
}
a.side:visited
{
color: #000080;
background: #ffffff;
}
a.side:hover
{
color: #000066;
background: #dddddd;
text-decoration: underline;
font-weight: bold;
}
Wow – I thought I was taking a BREAK from work to read Frank’s site, but all I got was a bunch of escaped tags and CSS discussion. I think I’ll go back to work now, sigh. 🙂
hln
Well you can make the number of quotes self counting for instance.
That way you can just drop them in cookie cutter like.
var text = new Array();
var i = 0;
//BLANK TO COPY AND PASTE –> text = ““;
text = “Guns Are Like Art, Except Not Useless“;
text = “Note to self: when asking, ‘What would Jesus do?’ remember that the answer is sometimes ‘Freak out and knock over tables.’“;
text = “My God, how many countries are there?“;
text = “Yes, it’s funny to laugh at Streisand, but do those who encourage her to speak out ever stop to think of her feelings? She is a human being, and, if they had any concern for her, the would lock her away in a home and train her to keep quiet through a series of painful shocks.“;
text = “Depite his enourmous head and the fact that he talks funny, Kennedy still has some pull in the Senate, due probably to the fear from other Senators that he might eat them, offer them a ride home, or, worst of all, headbutt them.“;
text = “Anyway, when the U.S. government gets serious on this assassinate Saddam thing, they have my e-mail. My rates for heads of state are a bit higher, but I will give a patriotic discount. Frank’s gots to eat, though, and he likes the prime rib.“;
//SNIP[…]
document.write(text[Math.floor((text.length-1) * Math.random())]);
See that set creates its own set of numbers so you don’t have to keep writing text[28], text[29], text[30], ect… for each entry.
This will work all the way up till 1.79E+308 entries.
So… don’t put too many funny quotes in there.
The CSS .side attribute should work the best (assuming you have control over the html and can output <a href=”blah blah” class=”side”>…..
Just put this at the bottom of your CSS file.
Replace silver with whatever color you want.
I just noticed that you use A tags to format your plain text in your side bar.
So instead of “.side A” you want “.side A:link” to just cover the links.
Using your quotes at http://www.virtualdoom.com YEA i’m a link whore!! Check it out 🙂
I think the quote looks a bit odd above the IMAO graphic. I’d put it just underneath the Unfair. Unbalanced. Unmedicated spiel.
hln
Do I have to stop posting pictures of you now?
🙂
Do you really need a black background? Why not change this to something that will reduce the contrast…it’ll be softer on the eyes that way.
Bah.
Light text on a dark background is easy on the eyes.
Whatever
The right background might improve the visibility of the links
6708 How can this all be right? Check out my site http://www.pai-gow-keno.com