phpyellowtm developer guideStartThis page contains information or links to the following: License
The proprietary license for phpyellow Pro and Lite Editions is here. RequirementsRequires PHP 4.1.2 and mySQL 3.23.23 database, or higher, running on a web server. Apache web server (preferred) on Linux O/S is ok. Client side browser support for Javascript and CSS preferable. Netscape 6 or Internet Explorer 5 or higher are supported. Minimal experience with modifying a PHP page is preferred. InstallThe Install Helper assists you in installing the Lite or Pro edition. To install do this:
Elapsed Time to InstallA novice with minimal PHP coding experience can install phpYellow in about 45 minutes. Installation services are also offered for a fee.SetupThe Install Helper walks you through basic setup - enough to get up and running. The essential setup is done with the file util-DIST-*.php. You change CONSTANTS in the util.php configuration file. The only essential constants to make the application work are these:
/* Database and connectivity */
define("DBNAME", "phpyellow" ); /* your mySQL database name - modify */
define("DBUSERNAME", "root" ); /* your mySQL username - modify */
define("DBPASSWORD", "" ); /* your mySQL username password - modify */
define("DBSERVERHOST", "localhost" ); /* the name of your database host server */
define("TABLECUSTOMER", "pycontact" ); /* DO NOT CHANGE OR DATA LOSS MAY OCCUR - pycontact */
define("TABLECATEGORY", "pycategory" ); /* DO NOT CHANGE OR DATA LOSS MAY OCCUR - pycategory */
define("INSTALLPATH", "http://www.yourdomain.com/phpyellow/"); /* The full URL with a trailing slash - modify */
The Install Helper expects you to have already created an empty database.
Ask your internet service provider for a mySQL database if you don't already have one.
The Helper automatically sets up database tables and inserts test records.
How to Upgrade from 3.x to 3.x10 point upgrade
If you changed the categories then you will need to open the new categories.php and paste your categories into it starting on line 21.
Users of the Pro Edition upgrading to 3.53 or higher must also paste this command into EasySQL:
SecurityEvery administration script is protected by transparent username and password security. RECOMMENDATIONS
SummaryThere are a number of levels of security but no mechanism anywhere is 100% safe from unwanted breach. Your best defense is to use a good, long and varied password and be sure to include numbers and other special characters in it. You can also change the admin user name, admin password, the name of the admin php file and other parameters. This is recommended. This may be performed in util.php Rather than make hacking easy, additional implemented phpYellow security precautions are embedded into the source code but not documented. You would need to go over every line of code to understand the built in security for phpYellow. Additional web server specific, scripting language specific and database specific security issues are not addressed here. These component specific concerns are best described in the documentation the components are delivered with.
FeedbackIf you can think of additional useful safety precautions to add to this document let us know. Database tables
Create Table Definition - MySQL Database OnlyThis definition is for your archive. You don't need to do anything with it - it's FYI.
# phpMyAdmin MySQL-Dump
# version 2.2.4
# http://phpwizard.net/phpMyAdmin/
# http://phpmyadmin.sourceforge.net/ (download page)
#
# Host: secret
# Generation Time: Sep 23, 2002 at 10:36 AM
# Server version: 3.23.51
# PHP Version: 4.2.3
# Database : `secret`
# --------------------------------------------------------
#
# Table structure for table `pycontact`
#
CREATE TABLE pycontact (
customerid mediumint(9) unsigned NOT NULL auto_increment,
password varchar(15) NOT NULL default 'password',
email varchar(80) default NULL,
organization varchar(45) default NULL,
firstname varchar(35) default NULL,
lastname varchar(45) default NULL,
address varchar(70) default NULL,
city varchar(25) default NULL,
stateprov varchar(25) NOT NULL default '',
country varchar(40) NOT NULL default 'United States',
postalcode varchar(10) default NULL,
areacode varchar(7) default NULL,
phone varchar(20) default NULL,
fax varchar(20) default NULL,
cellphone varchar(20) default NULL,
website varchar(140) default NULL,
imagecompany varchar(120) default NULL,
lastupdate timestamp(14) NOT NULL,
customersince date default NULL,
visits int(4) unsigned default NULL,
role varchar(30) default NULL,
privacy enum('low','medium','high') default 'medium',
news enum('yes','no') NOT NULL default 'no',
newsformat enum('plain','html') default NULL,
PRIMARY KEY (customerid,customerid,customerid),
KEY stateprovidx (stateprov(15)),
KEY countryidx (country(20)),
FULLTEXT KEY wholesite (organization,firstname,lastname,address,city,
stateprov,country,postalcode,areacode,website,role)
) TYPE=MyISAM;
# phpMyAdmin MySQL-Dump
# version 2.2.4
# http://phpwizard.net/phpMyAdmin/
# http://phpmyadmin.sourceforge.net/ (download page)
#
# Host: secret
# Generation Time: Sep 23, 2002 at 10:35 AM
# Server version: 3.23.51
# PHP Version: 4.2.3
# Database : `secret`
# --------------------------------------------------------
#
# Table structure for table `pycategory`
#
CREATE TABLE pycategory (
ckey int(9) unsigned NOT NULL auto_increment,
fkcustomerid mediumint(9) unsigned NOT NULL default '0',
category varchar(80) NOT NULL default 'other',
description mediumtext,
rank tinyint(1) unsigned NOT NULL default '0',
paymentrequired enum('yes','no') default 'no',
status enum('pending','approved','expired') default 'approved',
expires date default NULL,
lastupdate timestamp(14) NOT NULL,
image2 varchar(120) default NULL,
image3 varchar(120) default NULL,
PRIMARY KEY (ckey),
KEY catidx (category(15)),
FULLTEXT KEY description (description)
) TYPE=MyISAM;
Other database subjects
Database Structure and Explanation
You can view the database fields, their datatypes and attributes here:
How to import records from other Yellow Page directoriesBasic Expertise NeededTo import records from other Yellow Page directories a good understanding of Structured Query Language (SQL) as well as an intermediate knowledge of programming PHP is needed. If you do not have this expertise it may be contracted out to a third party. Steps to Import
Other considerationsYou may want to review your old categories and collapse similar categories into just one category. Thousands of categories are physically hard to fit on just one web page, and harder to fit into a select drop down list. By collapsing into fewer categories you make customer searches faster, and make it easier to fit the categories on the front page. What to watch out for?The most important consideration is to relate each child category record to its parent contact record. Secondary KeyEach email address and password should be unique. Some customers may not have email addresses. These may be issued not valid domain names Example: 555-123-4567@domain.nul. Use a different phone number for each such listing. You may adjust the display of listings to NOT show email addresses of a single domain. View php source in proListingFirstPage.php, proListingPreferred.php, proListingBasic.php and add the domain to ignore. ExampleThis site exported over 50,000 listings into a phpyellow format:
So you want to add more database fields?One must consider the logic of the application in every respect before adding a single field. If a field is added to a table, then the scripts which insert, update, search on, delete or otherwise use the field must also be modified to accept the new field. Then testing takes place. If all is well, the new code is uploaded to the website. The documentation should be updated to reflect the new table structure. You can count on a minimum of USD$120 per extra field added to the phpYellow Pages application if you ask for a quote on your changes. The feasibility and desirability of any proposed changes is also considered. |