On: 2005/04/29 Viewed: 53534 times
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 :

HTML:
  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 :

HTML:
  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)

CODE:
  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 :

CODE:
  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 !

Related posts

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.

83 Blablas

    Pages: [9] 8 7 6 5 4 3 2 1 » Show All

  1. 83
    John Mexico »
    said, 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/

  2. 82
    John United States »
    thought, 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.

  3. 81
    sgazzetti Bulgaria »
    said, 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.

Pages: [9] 8 7 6 5 4 3 2 1 » Show All

Leave a Reply

Comment Guidelines or Die

  • HTML: You can use these tags: <a href=""> <em> <i> <b> <strong> <blockquote>
  • Posting code: Post raw code (no <> &lt; etc) within appropriate tags : [php][/php], [css][/css], [html][/html], [js][/js], [sql][/sql], [xml][/xml], or generic [code][code]
  • Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar.
  • Spam: Various spam plugins on patrol. I'll put pins in a Voodoo doll if you spam me.
  • I will mark as Spam test comments, all comments with SEO names (ie "My Cool Online Shop" instead of "Joe") or containing forum-like signatures.

Close
E-mail It