Professional
Personal
Site
Profiles
Sponsors

Features

Thank you for downloading QuoteBook. QuoteBook aims to help you add funny and/or inspirational quotations to your website.

Features of QuoteBook

  • Creates a searchable database of your quotations
  • Comes free with a starter kit of 100 quotations
  • Form included to add new quotations to your database
  • Open source, so you may tweak it to better serve your needs
  • Simple, no-frills approach to maintaining a quote collection
  • Convenient include file allows you to add a "Thought of the Day" to any page on your website

Requirements for using QuoteBook

  • PHP version 4.0 or greater
  • MySQL version 3.2.3 or greater

Get Started

To get started, use "quotesdump.sql" to initialize the MySQL tables. After that, the scripts should work fine!


Common Questions

How do I use the "Thought of the Day" feature?

Any script on your website can implement the "Thought of the Day" by including "quotes.inc" and calling "displayRandomQuote()".

The SQL file loaded into my database OK, but I can't see anything on the PHP pages

In newer versions of PHP, global variables are turned off. You can either replace all the references to $PHP_SELF with $HTTP_SERVER_VARS[\"PHP_SELF\"], or change register_globals to "on" in php.ini (WINDOWS: %SYSTEM_ROOT%, other: ??).
More info:
; - register_globals = Off [Security, Performance]
; Global variables are no longer registered for input data (POST, GET, cookies,
; environment and other server variables). Instead of using $foo, you must use
; you can use $_REQUEST[\"foo\"] (includes any variable that arrives through the
; request, namely, POST, GET and cookie variables), or use one of the specific
; $_GET[\"foo\"], $_POST[\"foo\"], $_COOKIE[\"foo\"] or $_FILES[\"foo\"], depending
; on where the input originates. Also, you can look at the
; import_request_variables() function.
; Note that register_globals is going to be depracated (i.e., turned off by
; default) in the next version of PHP, because it often leads to security bugs.
; Read http://php.net/manual/en/security.registerglobals.php for further
; information.

How do I determine who is a "favorite author"?

In quotes.php, about two thirds of the way down, is a query that determines the number of quotations accredited to an author in order for them to be considered a favorite.

//This query selects all authors having 3 or more quotes in the database. You may find you want to increase this number. $strSqlQuery = "SELECT Quotes.Name AS Author, COUNT(*) AS numQuotes FROM Quotes WHERE Quotes.Name <>'Anonymous' And Quotes.Name<>'Unknown' And Quotes.Name <> 'Fortune Cookie' GROUP BY Quotes.Name HAVING COUNT(*) > 2 ORDER BY Quotes.Name";

By changing the number in the query, you can alter the number of quotes needed to be a favorite author.


Back to Freedville Central: Open Source Software



Questions? Comments? Please let me know! arfreed@nc.rr.com is my email address.