Fortunate provides a random quote or quotation (also known as a 'fortune cookie') for your blog.
This is entirely up to you, however some page locations may interact in a negative way with your theme. The safest place to display is in a sidebar widget and should work with any widget enabled theme.
The default location is at the end of the main loop, which should place the fortune at the bottom of the content region in your pages.
If you use the header, the fortune will display beneath your blog description, assuming your theme provides the blog description. When using the header location, you should probably choose 1 or 2 as 'Maximum number of text lines' in the options to avoid messing up your banner with long quotations.
You may also use the page footer, but be aware that many themes place the footer content outside the themed region.
In some cases you may need to change CSS definitions to fit the results into your chosen theme. Copy the supplied 'fortunate-template.css' file to 'fortunate.css' and edit to your liking. Then visit the options page and tick the box to include the CSS file.
It is quite possible to provide search parameters which do not match any quotations at all. Fortunate does not provide any error messages when there are no matching results. Check your settings to see if you may be too specific through use of a search term or quotation size. Fortunate works best without any specific search limitations. Also be aware that the adult/offensive ratings are currently only valid for English, Spanish, and Italian. For all other languages please use 'normal (no adult/offensive content)'.
It is also possible to set the timeout settings too low to respond in a reasonable time. The default is 5 seconds, which should work for any but the most remote regions of the planet.
You may call the fortunate_fetch() function directly from your page templates to provide more than one quote on a page and with complete control of options and theming.
<?php echo '<div class="myownfortunate">' . fortunate_fetch(array('lang' => 'fr', 'numlines' => 2)) . '</div>' ; ?>
This will produce a French quote of two lines (max) and allow you to theme it using CSS as a different class than the standard quotation theme (which would correspond to class="fortunate").
<?php echo '<div class="fortunate">' . fortunate_fetch(array('db' => 'bush')) . '</div>' ; ?>
This will provide a quote from George Bush. Please note that this database is only valid for the English language (which is the default).
<?php echo '<div class="fortunate">' . fortunate_fetch(array('lang' => 'en', 'type' => 'o', 'db' => 'sex')) . '</div>' ; ?>
This will provide an offensive quote from the English 'sex' database.
The options array is entirely optional, and will use standard defaults for any setting not supplied.
It may consist of any of the following:
'root' => string - location of WPINC directory
'conn_timeout' => float - number of seconds, default 5
'lang' => 'en','es','it','fr','de','ru' - default is 'en'