For ubu roi and anyone else who is interested in a few of the tricks used on this site, here are a few bits of code that might help you out. Sadly, you can’t really do this stuff as plugins, which means you have to edit the code yourself. This will either be very easy or a little confusing, depending on how comfortable you are with PHP. Also, this code is only going to be useful if you’re using wordpress.
First, the random quote. Create a quotes file named “quotes.txt” and put it in the /wp-content filder. The file should have three lines for every quote: The first is the quote itself, the second is the person being quoted (leave blank if you dan’t want this) and the third is a required blank line. Mine looks like this. Now, somewhere in the PHP code for your site (I suggest at the top of the header.php) place this code:
<?php /*----------------------------------------------------------------------------- Pull out a random quote from the quote file and display it. -----------------------------------------------------------------------------*/ function random_phrase () { $quotes = file ("wp-content/quotes.txt"); $num = rand (0, intval (count ($quotes) / 3)) * 3; echo $quotes[$num] . "<br>" . $quotes[$num + 1]; } ?>
Almost done. Now just put this little bit of code where you want the quote to appear:
<?php random_phrase (); ?>
Juvenile and Proud

Yes, this game is loud, crude, childish, and stupid. But it it knows what it wants to be and nails it. And that's admirable.
If Star Wars Was Made in 2006?

Imagine if the original Star Wars hadn't appeared in the 1970's, but instead was pitched to studios in 2006. How would that turn out?
Dead Island

A stream-of-gameplay review of Dead Island. This game is a cavalcade of bugs and bad design choices.
Overused Words in Game Titles

I scoured the Steam database to figure out what words were the most commonly used in game titles.
What is Piracy?

It seems like a simple question, but it turns out everyone has a different idea of right and wrong in the digital world.
awesome! I am definitely going to use that.
Can we get teh code for the small dice roller at the bottom of your sidebar next?
Yep, I was going to extract my old quote file and use it.. .then I remembered it wasn’t on Houblog, it was on a friend’s site I had admin to… and it’s gone. Rats. I had a great one from a movie on how it was against the university’s policy to make war on the United States. It was so ironic, given the politics of some faculties these days.
Excellent! Thanks so much!
I’m assuming you use something similar for the other random aspects of your site- instead of quotes is just code to display header/footer/diceroll.
Am I correct?
I agree with you , your done a great job~
You have done a great job. Thanks for the Lexikon Plugin.
Thanks for the code. I included this code in wordpress footer to get random quotes.
Thanks :D
def gonna use this on a couple of my blogs! thanks a lot mate
Can you make it so it uses the same file for the quotes. So instead of using the .txt file, you can store the quotes inside the .php file?
This will make the file more maintainable and it will use have better performance I think.
Thanks and kudos.
That’s a terrible idea. Segregation of code and data is almost always the way to go.
I love quotes, espcially motivation ones, they can really change your day :)
Anyway, nice idea , gonna use it on my blogs also, thanks!
Thanks for the handy tip!! That really is an useful piece of information. I have to say I love the way your blog is dressed especially those colored dice thing :)
Thanks for the code
Thank you for posting this. Very useful. We’re using this for showing testimonials in the footer our site.
On another note, I think there’s a small bug in the code – with the offset. We tried the following and it seems to work more consistently:
function random_phrase () {
...
$num = rand (0, intval (count ($quotes) / 3) - 1) * 3;
...
}
Hope this helps.