tQuotes Version 0.03b README
Copyright 2001 - 2003 Stephen G. Walizer aka Technomancer all rights reserved.
License

This software is licensed under the GNU GPL. See the included file GPL for license details.

Bug Reports

Send bug reports or questions to sgw@node777.net

About

tQuotes is a set of PHP4 scripts to provide and manage random quotes in web pages. The system's backend is provided by a MySQL database, and support is included for adding, deleteing, and editing the quotes list.

The most current version of tQuotes is available at http://node777.net/tquotes.php.

Installation

Installation of tQuotes consists of the following steps:

  1. Move the files contained in the tQuotes package to a directory that allows execution of PHP scripts. It is recommended that this directory be secured as anyone with access to this directory can modify your quotes.
  2. Check permissions on your files and make sure PHP has permission to write to the following:
    • tq_config.inc
    • tq_getquote.inc
  3. Open index.html in the tQuotes directory and select Edit Configuration from the menu at the left. Fill out the form and click Submit. For detailed information on the configuration options, see the Configuration section of this document.
  4. Select Build DB Tables from the menu at the left. This page executes a set of MySql commands that builds the table to hold your quotes.
  5. Select Add Quote from the menu and start adding quotes.
Configuration

tQuotes is configured through an html-based configuration tool accessed from the Edit Configuration link in the tQuotes menu. The editor supports the following configuration options:

MySql Settings

Database Host
The host variable contains the host for the MySql server to connect to. This is usually localhost if the database server resides on the same machine as the web server.
Database Login
The user name to connect to use when connectiong to the MySql server.
Database Password
The password to use when connecting to the MySql server.
Database Password Verification
Enter the same value as Database Password. This field protects against typos when entering a password.
Database Name
The name of the database to use when connecting to the MySql server.
Quotes Table Name
The table name in the MySql database where quotes will be stored.

Quotes Configuration

Escape Special Characters
This flag controls the escaping of special characters in news items. If this field is checked, special characters will be escaped.. Most installations of PHP4 automatically escape special characters, so the default is for this field to be unchecked. If you have problems adding quotes containing apostrophes, check this field.
Install Path
The full path to your installation of tquotes.
Data Import/Export

tQuotes allows you to export your data for import into another tQuotes installation. To export your data make sure PHP has write permissions for the directory tQuotes is installed in. Once this is done simply click the Export DB Table Data link in the tQuotes menu. This will generate a script called tq_import.php which contains your database data and code to insert it into an existing tQuotes installation.

To import your data into a new or existing tQuotes installation simply copy the tq_import.php file into the tQuotes install directory and click the Import DB Table Data link in the tQuotes menu. (If you are importing data into a new installation, be sure you have built your database tables using the Build DB Tables link in the tQuotes menu before trying to import.)

Exporting Quotes to a Text File

tQuotes allows you to export your quotes to a text file. To export your quotes make sure PHP has write permissions for the directory tQuotes is installed in. Once this is done simply click the Export Quotes to Text link in the tQuotes menu. This will generate a file called quotes.txt which contains the text of all quotes not marked as deleted in the database. The file contains one quote per line.

Usage

tQuotes is very easy to use. Simply load index.html in the tquotes directory in a web browser and select the desired function. The main web page contains options to add quotes, edit existing quotes, mark quotes deleted, undelete deleted quotes, and purge deleted quotes. The only option that is not really self explanatory is purging deleted quotes. Deleted quotes are simply marked as deleted and left in the database, allowing them to be undeleted later. Selecting purge permanently removes all deleted quotes from the database.

Quotes are included in web pages by adding the following block of code to the page (note tq_getquote.inc should be the path to the file):

<?php
  require('tq_getquote.inc');
?>