REGISTER or LOGIN to have the annoying ads removed.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random Quote Generator
#1
HI,

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
Reply
#2
Lol, what?!
Reply
#3
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.
Reply
#4
If you are looking for a random image generator i could help you out.
[Image: jsnippetsbanner.jpg]
Latest Theme: CMS BB.
Reply
#5
Make just one change.

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


Possibly Related Threads...
Thread Author Replies Views Last Post
  Random Quote Generator mortalc 2 1,338 May 06, 2010, 05:29 AM
Last Post: LS 134
  Quote Find. iR00T 2 1,393 Jan 19, 2010, 01:35 PM
Last Post: Jessie S.
  Generator Xeon 0 837 Oct 23, 2009, 08:38 PM
Last Post: Xeon
  Sitemap Generator RPG 2 1,884 Feb 27, 2009, 06:48 PM
Last Post: labrocca
  Select quote on MyBB S!ck 16 7,395 Dec 17, 2008, 01:28 PM
Last Post: S!ck

Forum Jump:


Users browsing this thread: 1 Guest(s)