phpYellow Pages Developer's Guide

Docs Home | Read Me | FAQ | License | Security | Install | ChangeLog | Customize | Paid Listings
INSTALLATION

If you are reading this from the packaged distribution file, you may want to visit Dreamriver's most recent online documentation.

TABLE OF CONTENTS

NEW!!! There is only one file you need to run: install.html

GENERAL

Use the Quickstart first. Follow the Regular instructions if needed.

QUICKSTART

New Install on a Remote Web Server

  1. download the phpYellow Pages distribution files from Dreamriver.com
  2. extract all files to your local machine
  3. open install.html
  4. follow the directions

Upgrade - for Upgrading From any Version 2 to the latest Version 2.x

  1. save a copy of files you have customized, for example:
  2. open the new util-dist.php file (or util-dist-Premium.php for paid Premium versions) and configure database and connectivity values as in utilORIGINAL-dist.php. Rename to util.php
  3. delete ALL of the phpYellow Pages php files on your web server. This does NOT affect your database records
  4. you should now have an empty folder on your web server called phpYellow
  5. from the newly extracted files upload underConstruction.php to /phpYellow and rename it index.php
  6. open the file install.html in your browser
  7. follow the directions

CREATE TABLE DEFINITION - MySQL Database Only

This definition is for your archive. You don't need to do anything with it - it's FYI.

create table contact ( 
yps mediumint(9) unsigned not null auto_increment PRIMARY KEY,
ypassword varchar(15) not null default 'password',
yemail varchar(80),
ycompany varchar(45),
yfirstname varchar(35),
ylastname varchar(45),
yaddress varchar(70),
ycity varchar(25),
ystateprov varchar(25) not null,
ycountry varchar(40) not null default 'United States',
ypostalcode varchar(10),
yareacode varchar(7),
yphone varchar(20),
yfax varchar(20),
ycell varchar(20),
yurl varchar(140),
ylogo varchar(120),
lastupdate timestamp(14), 
index stateprovidx (ystateprov(15)),
index countryidx (ycountry(20))
)

contact table FIELD names only - for use in creating your own forms - optional
yps
ypassword
yemail
ycompany
yfirstname
ylastname
yaddress
ycity
ystateprov
ycountry  
ypostalcode
yareacode
yphone
yfax
ycell
yurl
ylogo
lastupdate

// yps ypassword yemail ycompany yfirstname ylastname yaddress ycity ystateprov ycountry ypostalcode yareacode yphone yfax ycell yurl ylogo lastupdate 


CREATE TABLE category (
ckey int(9) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
ypsid mediumint(9) UNSIGNED NOT NULL,
category varchar(80) NOT NULL DEFAULT 'other',
description varchar(255) NOT NULL DEFAULT 'No description',
rank tinyint(1) unsigned not null default '0',
paymentrequired enum('yes', 'no') default 'no',
status enum('pending', 'approved', 
'expired') default 'approved',
expires date,
lastupdate timestamp(14),
index catidx (category(15)),
index descidx (description(15)))




category table FIELD names only - for use in creating your own forms - optional
ypsid
category
description
rank
paymentrequired
status
expires
lastupdate


// ypsid category description rank paymentrequired status expires lastupdate

NEW REGULAR INSTALL ON A REMOTE WEB SERVER

If the Quickstart failed to provide adequate directions then the following instructions are for you:

  1. Read the instructions (this file)
  2. Go to your server and make a new directory called "phpYellow" without the quotes.
  3. upload all files to the directory
  4. Configuration

CONFIGURATION

Open util-dist.php in a text editor (such as Notepad) and save it as util.php. Within util.php change all the // CONSTANT declarations starting near the top of the page. More configuration suggestions and examples are contained within the comment lines for each item. Do NOT change the name of the constants, but rather change the value of the data the constant will hold. For example, change the constant called WEBMASTER to be your email address:

example: define("WEBMASTER", "webmaster@yourdomain.com" ); // change lower case letters only.

Continue and change each constant to the value it should be in your circumstance. Upload this changed util.php file to your web server along with testdb.php and install.php and yellow.css. In no case should any data be deleted; data will only need changing to another value. If unsure what values to change then ask your local internet service provider, or post your query to the support bulletin board at http://www.dreamriver.com/forums/

Configuring Standard & Premium Version CONSTANTS

Following are descriptions of how to use some of the CONSTANTS defined in util.php

FEATURELISTING

Guaranteed top quality placement on EVERY search page. Your best possible listing position. Prospective customers are given your email address to make inquiries.

To change or set a Feature Listing you set a unique number. You may change it as often or as little as you like. You also set the price for this prime listing position. The listing really does appear with every search result! It can be worth a lot - and you decide how much to charge your customers for this.

The CKEY field number is the unique number to change. It is shown with each search result, in gray at the bottom of each record. All you have to do is enter the ckey number in util.php next to the constant called FEATURELISTING, and upload util.php to your server. The generation of the actual listing is all database driven - you just set the number, phpYellow Pages does the rest.

RECORDSPERPAGE

The number of results per page in any search - modify if wanted. Generally you will want to set this number lower, for example at 10 records per page. If you are using paid listings then the more records per page you allow the more first page listings you can have, and get paid for.

QUEUELISTINGS

This constant tells phpYellow pages whether or not to send listings to a queue for administration approval. The default is "no". A value of "no" will publish new or updated listinngs immediately. A value of "yes" will queue ALL new and updated records for administration preview and approval prior to publication.

To approve any listing, just go to admin.php and use the Preview Listings by Status tool. It automatically checks the database and reports status of listings. You can then point and click to set the status of any listing to pending, approved or expired. The main search seen by website visitors will only use approved listings in any search results.

The recommended value for QUEUELISTINGS is "no". There are a number of reasons for such a preference:

PAIDLISTINGS

In general you should be referring to the page about Paid Listings for comprehensive information about paid listings and phpYellow Pages.

Refer to the Paid Listings docs.

Toggle paid listings on or off - "yes" will enable script processing, anything else will disable processing. Processing is linked to various payment methods.

BYPASSCARDPROCESSOR

This is used to test what happens to a paid listing without involving the gateway processor. This rechannels the processing from an internal form to an internal script - it bypasses the card processor entirely. Normally you will want to go to the card processor - this feature is just for testing. Try it, but remember to change it back to live mode. Set the value to "no" to include the card processor.

DATABASE AND PHP CONNECTION

Load install.html in your web browser and follow the directions.


FILES - some of the more significant files

FILE				PURPOSE
install.html	    // helps you install the entire application
admin.php           // login to your administration pages
easysql.php 		// no, you can't load it directly - it has to be secure from hacking
	     			// you can load easysql.php in a link within the admin.php page 			
index.php			// the start and search page the users see
login.php			// user add-edit-delete module
password.php		// the user attempts to find their password
admin.php			// administration only - internally phpYellow password protected
categories.php		// holds all the categories, individual items may be added, edited or removed
countries.php		// contains all the countries, individual items may be added, edited or removed 
upgrade.php         // Yellow Pages Premium - make $money, see POTENTIAL REVENUE.

CMS Bridge

Parts of Version 2.24 and higher versions incorporate CMS Bridge middleware. This is useful if you are using a Nuke software product and want to integrate your Nuke copy with the phpYellow Pages application. See http://portal.dbserve.net/codeshare/cms_bridge.htm for instructions and information.

CUSTOMIZATION

Visit the customization page and find out how to optimize your implementation.

POTENTIAL REVENUE

Cash is good. Upgrade to a paid version and earn some by charging for the position of listings on YOUR pages. YOU set the rate you charge your customers. Premium phpYellow Pages lets you easily set the page position of any listing with a few mouse clicks, and comes with a wide range of new, feature rich benefits.

Many more features are also available with the paid version. More features are constantly added - but mostly to the paid version only.

More Info?

For the website owner:

OTHER SOFTWARE PRODUCTS

Check out our software page for more Dreamriver.com software products. There are new products "in the pipeline" and coming soon!

http://www.dreamriver.com

??? SUPPORT ???

Get FREE support for a Standard OR Premium version by sending email to phpYellow@dreamriver.com

Thank you for your interest in DreamRiver products.

END OF DOCUMENT

Docs Home | Read Me | FAQ | License | Security | Install | ChangeLog | Customize | Paid Listings

All Pages Copyright©2000,2001,2002 Dreamriver.com. All rights reserved.