On: 2005/04/29
Shorter URL for this page: http://ozh.in/l4

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

Download the plugin :
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 :

  1. a nice person
  2. a <em>porn star</em>
  3. so <em>cute</em> !
  4. <span style="color:purple">teh master of teh intarweb</span>
  5. reloading the page
  6. pretty. Well, sort of.

In this page I wrote :

  1. 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 reloading the page

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)

  1. trackback: trackback, pingback, chmlmlback, stuffback, sumthinback, trackpingback
  2. comment: wrote, said, replied, thought, commented
  3. 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 :

  1. <em>640K ought to be enough for anybody.</em><br />&raquo;<strong>Bill Gates</strong>, 1981
  2. <em>A fast word about oral contraception. I asked a girl to go to bed with me, she said 'no'.<br />&raquo;<strong>Woody Allen</strong>, yesterday
  3. ...

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 !

Shorter URL

Want to share or tweet this page? Please use this short URL: http://ozh.in/l4

Metastuff

This page "WordPress Plugin : Random Words" was posted on 29/04/2005 at 9:45 pm
Watch this discussion : Comments RSS 2.0.

87 Blablas

  1. rayven says:

    interesting. how difficult would it be to make this plugin return a random member of your WP blog? for example, if i wanted to hold contests like: sign up now! random winners chosen daily.

  2. Ozh says:

    rayven » such a plugin wouldn't be difficult to do (before you might ask: no, I cant' do it) but Random Words would not even be an interesting start for it. The only code they would share would probably be a one liner randomizer function.

  3. g. says:

    Had loads of fun with this! Thanks so much. I put it in my title tags and comments worked great. I want to duplicate the fun in my RECENT COMMENTS on my sidebar – so far to no avail.
    this is my code and it won't show up!

    %comment_author: %comment_excerpt

    any ideas? thanks.
    g.

  4. g. says:

    i think i'm dead. so sorry!
    let me try again:
    Had loads of fun with this! Thanks so much. I put it in my title tags and comments worked great. I want to duplicate the fun in my RECENT COMMENTS on my sidebar – so far to no avail.
    this is my code and it won't show up!

    %comment_author: %comment_excerpt

  5. Les says:

    I had the "page not found" problem on first installing the plugin. Moving it out of the containing folder, so the file sits loose in the plugins folder made it behave itself.

  6. […] Ozh’ Random Words: ???Wordpress??????. […]

  7. […] ???????. Quote Rotator: ???Wordpress??????. Ozh’ Random Words: ???Wordpress??????. Favourite Bible Verses: ????????. Tinin […]

  8. […] Ozh’ Random Words: ???Wordpress??????. […]

  9. […] Ozh’ Random Words: ???Wordpress??????. […]

  10. Leif Kendall says:

    Hi, Could this plugin be adapted to generate random words? I'd really like a WP plugin that allows me to have a box on a page of my WordPress website in which a random word is inserted whenever the page is viewed. Is that possible? (Thanks for adding to the wealth of WordPress wonderfulness!)

  11. Ozh says:

    Leif Kendall » random word from a user defined list, yes. Randomly generated word, no.

  12. […] Ozh’ Random Words: ???Wordpress??????. […]

  13. bulent says:

    hi
    i activate the random words plugin
    but when i click the "random words" inthe admin control panel this comes :

    "Fatal error: Call to undefined function: add_action() in /home/bulexcom/public_html/wp-admin/wp_ozh_randomwords.php on line 327"

  14. Ozh says:

    bulent » Don't know. You uploaded/edited/did it wrong.

  15. bulent says:

    dont think
    so it is so simple to upload and activate a plugin
    anyway
    i will look for another plugin then

  16. […] Ozh’ Random Words: ???Wordpress??????. […]

  17. […] Random Words von Ozh erlaubt es mehrere Listen mit Worten oder Phrasen anzulegen. Die Worte oder Phrasen können dann in Templates oder mittels eines Tags in Beiträge oder Seiten eingebaut werden und werden an diesen Stellen in zufälliger Reihenfolge eingeblendet. Bookmarks setzen: Diese Icons verlinken auf Bookmark Dienste bei denen Nutzer neue Inhalte finden und mit anderen teilen können. […]

  18. […] Ozh’ Random Words: ???Wordpress??????. […]

  19. D says:

    Howdy!
    I downloaded the zip file 2 days back, unzipped it, copied it into the plugins folder, FTPed it to my blog, activated it on the plugins page, hit the manual&setup link & got, "Cannot load wp_ozh_randomwords.php."

    The PHP file is definitely there on the blog. Did I miss a step? Curse these uninformative error messages!

    D

  20. Graham says:

    Great idea for a plugin and would be very useful for something i have planned :-)

    doesn't work in wp 2.7 (trunk)

    error message is

    "Cannot load wp_ozh_randomwords.php."

    after activating and going to options

  21. Ozh says:

    Graham » Fixed, upgrade!

  22. […] Ozh’ Random Words: ???Wordpress??????. […]

  23. […] old boring comment pages full of "Joe said" with something random like "Joe thought", "Joe …..read more Download Plugin! Version 1.0.1 Last Updated: December 4, 2008 Author: Ozh Visit Plugin's […]

  24. […] Ozh’ Random Words: ???Wordpress??????. […]

  25. […] Ozh’ Random Words: ???Wordpress??????. […]

  26. […] Ozh’ Random Words: ???Wordpress??????. […]

  27. Arno says:

    I can't access the setup (I 've got WordPress 2.8)

    Error message is:
    "Cannot load wp_ozh_randomwords.php."

    Please help me.

  28. […] Ozh’ Random Words: ???Wordpress??????. […]

  29. […] Ozh’ Random Words: ???Wordpress??????. […]

  30. […] Ozh' Random Words: ???Wordpress??????. […]

  31. sgazzetti says:

    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.

  32. John says:

    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.

  33. John says:

    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/

  34. sbox says:

    Is this plugin support Chinese Characters or UTF-8 encoding?

  35. Rob says:

    I've been using this for ages, thank you!

  36. Jul says:

    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?

  37. Ozh says:

    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.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar and sign for a free account
Spam: Various spam plugins may be activated. I'll put pins in a Voodoo doll if you spam me.