MyBB Central

Full Version: Random Quote Generator
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I am looking for a plugin that displays a random quote or joke whenever the page is reloaded, ideally the display box would be at the top of the index.

Is any one aware of such a plugin, or can I request one to be made?

Many Thanks
Lol, what?!
PHP Code:
$query $db->simple_select("quotes""*""", array("order_by" => "RAND()""limit" => 1));
$quote $db->fetch_array($query);
$randomquote htmlspecialchars_uni($quote['quote']); //labrocca edit 

That's the query you could use. Table called mybb_quotes, quote is (unsurprisingly) the name of the column with the quote in. Hook into index_start, put {$randomquote} in the template.

Give me a day or two and I might make it as a normal plugin file.
If you are looking for a random image generator i could help you out.
Make just one change.

$randomquote = htmlspecialchars_uni($quote['quote']);
Ah yes, updated post.