Random Words is another completely futile plugin which aims to bring entropy and randomness into your pages and even posts.
Ever got bored by comment pages with the same "Joe said", "Jim said" all page long ? Wouldn't it be funnier and more attractive if it printed something randomly from "thought", "wrote", "said" and "commented" ? Here we are.
Random Words is a WordPress Plugin allowing you to manage a number of lists with any items, and display random items from these lists. Everything is managed from within the Admin interface of your blog, in a very neat interface. It stores its data in two fields of WordPress' built-in Options table, and displays random entries at no cost (no extra SQL query used to fetch items)
Get it
ozh-random-words.zip
Extract and upload to your blog, preserving directory structure if any.
Note: download counter here and stats on wordpress.org may differ and reflect the number of downloads before this plugin was hosted on the plugin directory
Activate it, go the options page and follow the instructions.
Use it
Use the following syntax :
- In .php documents :
<?php wp_ozh_randomwords('name_of_list') ?>
If you want the result returned but not echoed, add a second parameter with value zero :
<?php $test = wp_ozh_randomwords('name_of_list', 0) ?> - In Posts or Pages :
[random:name_of_list]
I don't see any reasonable use for this in posts, but well, I had to do it :)
Watch it
For example, I created a list named "you_are" with the following entries :
-
a nice person
-
a <em>porn star</em>
-
so <em>cute</em> !
-
<span style="color:purple">teh master of teh intarweb</span>
-
reloading the page
-
pretty. Well, sort of.
In this page I wrote :
-
I see, I see ... that you are [ random: you_are ]
The result is (reload to see it change) :
I see, I see ... that you are pretty. Well, sort of.
Keep list names short and avoid funky characters, but use anything including HTML in the entries. It has to be one-liners, but you can insert a manual <br/>
Push it
A few suggestions, or examples of use (name of the list, followed by items of the list)
-
trackback: trackback, pingback, chmlmlback, stuffback, sumthinback, trackpingback
-
comment: wrote, said, replied, thought, commented
-
emphasis: extremely, wickedly, awesomely, completely
You could also use it as a Quote of the Second script : create a list named "quotes" and add entries like :
-
<em>640K ought to be enough for anybody.</em><br />»<strong>Bill Gates</strong>, 1981
-
<em>A fast word about oral contraception. I asked a girl to go to bed with me, she said 'no'.<br />»<strong>Woody Allen</strong>, yesterday
-
...
Tell me
Got a suggestion, a bug report, something to tell, to thank or to complain about ? Using this plugin on your blog ? Made something fun with it ? Tell me !
Related posts
Shorter URL
Want to share or tweet this page? Please use this short URL: http://ozh.in/l4
Metastuff
87 Blablas
Pages: [9] 8 7 6 5 4 3 2 1 » Show All
Pages: [9] 8 7 6 5 4 3 2 1 » Show All
commented, on 29/Apr/10 at 11:21 pm # :
Jul » assuming the plugin works (wrote it a loooooong time ago and didn't check it recently) (it should work anyway) yes it will do the job.
commented, on 29/Apr/10 at 11:07 pm # :
So the output of this is dynamic and changes each time you refresh the page? Or isn't it? I'm desperately looking for something to choose a random phrase from a list only once, without changing when refreshing. Does/can this plugin do the job?
thought, on 26/Apr/10 at 7:44 pm # :
I've been using this for ages, thank you!
wrote, on 18/Mar/10 at 5:25 am # :
Is this plugin support Chinese Characters or UTF-8 encoding?
commented, on 29/Oct/09 at 2:01 am # :
For those of you looking for a random text replacement to Ozh's that is WordPress 2.8 compatible, Pants On Head's RandomText plugin just gained shortcode support (at my begging).
http://www.pantsonhead.com/wordpress/randomtext/
said, on 25/Sep/09 at 4:16 pm # :
Ozh, is it at all possible that you can fix your fantastic Random Words plugin? It is not a futile plugin. It is very important to me and I have a specific way that I use it and it is tremendously valuable to me.
Thank you kindly.
commented, on 07/Sep/09 at 8:38 am # :
Hi Ozh--
I love your plugin and have been using it for a variety of things on my blog for about five years, through various versions of WordPress, with never a hiccup -- until the latest upgrade I did, to WP 2.8.4. Everything was problem-free except for your plugin. When I click on the 'Manual & Setup' link I get an error message: 'You do not have sufficient permissions to access this page.'
I've tried various fixes tossed up by Google, but none have worked, and as I am having the problem only with Random Words (all other plugins allow me to access their configuration pages), I wonder if it's some problem with RW and WP 2.8.4.
Thanks so much for authoring this plugin, and if you can offer any suggestions for a fix, I'd love to hear them.