Drupal - Display Random Quotes

The following PHP snipet allows you to add a block to your Drupal site that will display a random quote from a list of user defined quotes.

Create a new block. Set the input format to PHP code. Then paste in the following (changing the quotes as desired, obviously):

<?php
$quotes[] = "Quote 1";
$quotes[] = "Quote 2";
$quotes[] = "Quote 3";
$quotes[] = "Quote 4";
srand ((double) microtime() * 1000000);
$randomquote = rand(0,count($quotes)-1);
echo "<div class=\"quote\"><p>\"";
echo $quotes[$randomquote];
echo "\"</p></div>";
?>

That's it. Now add the block to your site as normal.

Buy cheap Links of London

Buy cheap Links of London jewellery at online jewellerybarnd UK store, including Links of London Necklaces,
Links of London Charms, Links of London Earrings,
links of london
links london
Hundreds of links of london jewellery in stock,Free Gift Wrapping,
links of london Necklaces
links of london Rings
links of london Earrings
Complete links of london jewellery collection,including necklaces,bracelets,earrings
links of london Bracelets
links of london Charms
links london Sweetie Bracelets
Best Discounted UK Tiffany Jewellery Sale Outlet provides designer Tiffany Ring, necklaces and other
jewelry in wholesale price. UK Tiffany specializes in
Tiffany jewellery
Tiffany

excellent

Excellent tips provided pyjamas by you. very well done and thank you so much.

While accomplishing some

While accomplishing some housekeeping afresh on my claimed website I was tinkering about with a pre-jQuery ajax enabled web allotment I had accounting to affectation accidental quotes from a SharePoint account on the site HP0-J22. The cipher was appealing animal HP0-J24 so I absitively to acclimate the web account alarm to use jQuery instead in band with the agnate functions displays I’ve been deploying lately HP0-S18.

Tremendous site! The premise

Tremendous site! The premise of this site particularly for it certifications, color scheme and template is also stunning. I always fascinated in learning graphics, exin training, web designs and related terms. I hope you would include discussion group in your site soon for eccouncil certification and graphic designing.

right code

you are right buddy :) Add cornify.js to 1Y0-A05 dumps your Drupal page by adding somewhere in the body:

<?php drupal_add_js('/js/cornify.js'); ?> [Drupal 5.x]

Change the file path as required for 70-564 dumps your site. That's it! To use the above code on a site that doesn't run on Drupal, simply add the same JS file as you would do normally. Save the page HP2-T11 dumps and try entering the konami code:

Drupal - Display Random Quotes

Informative blogs ever much viewed, after a long time I found 1z0-042 practice exam that type of site. I love to reading blogs because there are many new information and updates and your article have good information 1z0-050 practice exam I like it thanks for sharing.i bookmarked this site and emailed it to a few friends, your post was that great, keep it up.

Awesome

I'm not very well versed in PHP, but how often is this coded to switch to another random quote? How would I go about changing it to change to a different quote everytime the page is refreshed?

Belay my last...

haha I added the code into my page.tpl.php for the theme, so that it displays in the mission statement area of the theme. I was just refreshing the page at first. After posting my last comment, I went to work on something else with the site, and while navigating around the site, I saw that it changes when a different page is loaded.

Thanks for the great code! :-)

RE: Belay my last...

Glad it was useful. Why on earth were you working on a Drupal template at that hour on Christmas Eve though...KEEN!

Thanks

A really simple solution.

Good informative site................

"Thank you!!!!!!!!! this website is SO easy to browse through, attractive, and has a ton of useful info...I love it!"!!!!!!Dan Pearce give all the solutions in a very simple and very good way.me agree with you and I like your comments so much......me busy in my mcitp practice test but me so much excited on this nice sharing.........