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 so cute !
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 !
Pages: « 1 [2] 3 4 » Show All
wrote, on 15/Apr/06 at 2:18 am # :
Thanks!
replied, on 21/Apr/06 at 9:42 pm # :
Can't get this to work on my wp 2.02 install. When I click on Options > Random Words it tries to go to ../wp-admin/wp_ozh_randomwords.php. This file doesn't exist. What am I doing wrong?
wrote, on 09/May/06 at 1:30 am # :
When I try to create a list in WP 2.0.2 I get this error message:
Warning: array_push(): First argument should be an array in /home/dragoonn/public_html/yellow7/wp-content/plugins/wp_ozh_randomwords.php on line 235
Have I downloaded/uploaded the file incorrectly or is it just not WP 2+ compliant (yet?)? I really love this script so if it's the latter, do you have plans to make it so soon? It is hands down the best randomization plug-in I've found for my quote hoarding tendencies.
commented, on 26/Jun/06 at 7:28 pm # :
Love it. Couldn't find a random image + caption generator for my news satire "blog" (without building a gallery somewhere) - but your plugin does the trick neatly, since it allows for the line to include HTML.
Random "Words" is generating the "Breaking News" image and caption in my Column B.
http://www.lowlights-now.com
Thanks so much! And I'll be using it elsewhere on the site with other lists. Thanks so much.
Question: I notice that hyphenated words (like "drug-induced" will not break at the hyphen and are forced to the next line; could that be changed?)
wrote, on 29/Sep/06 at 9:48 pm # :
random text+
thought, on 03/Oct/06 at 9:38 pm # :
I have been enjoying this plugin for some time without issue, but today I tried to make a new list, and change an old one, and I keep getting "Something went wrong: unable to save lists in the datadase." Is this using the MySQL database? And if so, what is the table name? I can tell that the admin function is pulling data from somewhere, and it's all showing up on the site just fine, but I need to locate the database (or find how/where it's being called by the script) so I can figure out what's up. Thanks!
thought, on 04/Oct/06 at 8:16 am # :
Marci » everything is stored along with WP options, i.e. in a line inside table 'wp_options'
commented, on 12/Nov/06 at 10:15 pm # :
nice plugin, havent tried it as yet, will in a while. and i must tell u ohz, i cant live without that drop down menu plugin life saver! :D its gotta be there in all wp installations, feels like shit without it. thankx a lot :D
thought, on 15/Nov/06 at 10:39 am # :
A small tip for everybody, who wants a random -tag text. Edit your html like this:
< ?php the_content(wp_ozh_randomwords('more',0))?>
Didn't find info about this second parameter "0", so had to search thru php code :)
commented, on 16/Nov/06 at 10:24 pm # :
Wow, THAT's a smart use, thanks for the idea I like it :)
wrote, on 28/Nov/06 at 8:01 am # :
I posted back in October that I could not get the plugin to write to the database (“Something went wrong: unable to save lists in the datadase.â€) and I am still having the problem. I can now find the data in MySQL, but I can't figure out how to get the plugin to save/edit. This was all working fine at one time. Any hints on what to check to resolve this? It's a really important part of my site, and I love this plugin!! Thanks :)
commented, on 05/Dec/06 at 10:21 am # :
Just checking to see if there is any hope for my problem. Has anyone else experienced this? What would cause the DB to not accept input from this plugin? Any ideas would be appreciated. Thanks!
thought, on 13/Dec/06 at 8:53 am # :
This is wierd...in spite of an error message which says it cannot write to the database, in actuality it IS writing to the DB, but it just generates the error message anyhow. Any idea why that would happen?
said, on 03/Jan/07 at 3:32 am # :
Nice plugin Oz - thanks a lot. I'm using it to pick out random sponsors who have donated to my daughter's fundraising - you can see it at http://www.emilydunnett.com on the sidebar and thank you page.
Any chance you could tell me a function to just return all the words in a list so I could format up a sponsor cloud. You wrote the code in a compact and excellent manner and while I will be able to get it in the end it might be a feature other people could use also.
Thanks again!!
pingback on 13/Jan/07 at 9:37 pm # :
[...] Random Words - from within a neat admin interface, manage lists of “items” (words, quotes, images…) and display random items in your pages or posts. [...]
pingback on 15/May/07 at 8:40 am # :
[...] å°±æ˜¯æ˜¾ç¤ºç•™è¨€è€…æ¥æºå›½å®¶çš„东东. ä»Šå¤©å†æ¬¡åŽ»PlanetOzh寻å®, 把Random Wordså’ŒClick Counter两个东东装上了, å…¶ä¸çš„Random [...]
replied, on 08/Jun/07 at 9:57 pm # :
I need some words for a title for my song. It's about a guy I dated and what not, well I always give gifts to him and he never give a gift to me. So I'm writing a song about him but can't find a title for it.
replied, on 08/Jun/07 at 11:37 pm # :
Name it: "the girl who had no clue about the sites she was reading". Duh.
thought, on 25/Jun/07 at 2:26 am # :
Insane! This is the greatest plug-in I have ever used! And I mean that so seriously: I have rotating blog descriptions on my header that I'd been using bulky javascript to produce.
I think you just shortened my load time by half and made my list so much easier to access. Kudos
pingback on 28/Jun/07 at 9:52 am # :
[...] Although my articles page calls attention to what I feel are my best posts. Last and greatest is Ozh’s random words. Now, whenever you comment, it’s just as likely to say “You bitched” as [...]