CodeGirl Classifieds Installation Instructions
Requirements
Creating
Directories
Configuring
Script Variables
Uploading
Files
Calling
the Script
Troubleshooting
Errors
HTML
Customization
Support
Copyright
Notice
*If you are upgrading from a previous version, you may copy and paste your configuration variables into the new classifieds.cgi file, upload it, and chmod 755. You will also need to upload index.txt as it has changed also. Always backup your scripts before making any changes. An easy way to do this is to rename your old script classifieds.cgi.BAK.cgi
- A website with access to a CGI directory.
- Perl 5.003 or higher.
- A FTP uploading utility that allows you to select ASCII or binary mode. If
you do not already have an FTP utility you might try WS-FTP or CuteFTP.
- Make a directory on your server where the data will be stored. For
security reasons it is best to make this folder in a directory that it isn't
web accessable. If you do not have access to a directory that is not web
accessable, you should use .htacess and .htpasswd files to protect the data
from being seen by visitors (contact your web host for more information about
password protection on your server). You should also upload an index.html file
to this directory if it is web accessable. If you are on a Unix server, chmod
the folder to 777. If you are using NT, give this folder full rights.
- Within the directory that you just created, make a directory named
bannedmail. Chmod this directory to 777 (or give full rights on
NT).
- Create a directory where uploaded images will be stored. Chmod this directory to 777 (or give full rights on
NT). This directory does not have to be in your CGI directory and if your web host does not allow images in the CGI directory you will want to make this directory under your public html directory.
Open classifieds.cgi
with a text editor such as WordPad.
The first line of classifieds.cgi is the path to Perl. Change this to the
path to Perl on your server. Be sure that this line starts with #!.
Contact your web host if you do not know the path to Perl on your server.
In the configuration section of classifieds.cgi (below the copyright notice)
you will need to set the following variables:
- $config{'basepath'}
- The path of the data directory you created. Be sure to include the
trailing slash.
- $config{'closedir'}
- The name of the directory for storing expired ads. This will allow you to
keeps ads for records and also allows users to repost their ads when they
receive an ad expiration e-mail. There is no need to create this directory,
the script will create it when run.
- $config{'regdir'}
- The name of the directory for storing users' registration files. There is
no need to create this directory, the script will create it when run. You may
also choose not to require registration by setting this variable to
$config{'regdir'} = '';.
- $config{'adminpass'}
- The password for accessing the administrative functions. You should change
this password immediately to a password of your choice.
- $config{'mailprog'} or $config{'mailhost'}
- These are your mail program and mail host variables. Choose only one of
these variables and comment the other line out by placing a # at the
beginning of the line. It is preferable to use a mail program and this is
possible with nearly all web hosts. Contact your web host for the path to your
mail program.
- $config{'admin_address'}
- The e-mail address where you would like to receive administrative mail
such as new user registration and new ad listing notifications. It is also the
address that will be listed on the e-mails that are sent to users.
- $config{'scripturl'}
- Your website address. This is not the address to your script. Do not
include http:// or a trailing slash.
- $config{'colortablehead'}
- The color of the table heading.
- $config{'colortablebody'}
- The color of the table body.
- $config{'colortableborder'}
- The border color for tables.
- $config{'sitename'}
- The name of your site. If your site name includes a possessive with an
apostrophe (i.e, Jim's), you should include a slash before the apostrophe
(i.e, Jim\'s).
- $config{'pagebreak'}
- The number of titles to display on each ad listing page.
- $config{'searchpagebreak'}
- The number of titles to display on each search results page. This does not
limit the number of search results, it simply limits the number of results
shown on a page.
- $config{'adlimit'}
- The number of ads each user is allowed to post. This does not include
expired ads.
- $config{'flock'}
- Allow file locking. This should be set to 1 unless you are
receiving file locking errors.
- $config{'newokay'}
- Set to 1 to allow users to post ads.
- $config{'imageuploaddir'}
- The path to your directory where uploaded images will be stored..
- $config{'imageuploadurl'}
- Complete URL to your directory where uploaded images will be stored. Include http://
- $config{'header'}
- The HTML code that will be appended to the top of your script. Be sure to
leave <<"EOF"; intact. Also be sure to include the HTML, HEAD,
TITLE, and BODY tags as wells as the EOF at the end of your
HTML. See the HTML
Customization section for additional tips for customizing your script.
- $config{'footer'}
- The HTML code that will be appended to the bottom of your script. Be sure
to leave <<"EOF"; intact. Also be sure to include the BODY
and HTML tags as wells as the EOF at the end of your HTML. See
the HTML
Customization section for additional tips for customizing your script.
To configure the ad duration choices a user has, search for <select
name=DAYS size="1"> in the script. After this you will see the options
for ad duration. You may change these to any amount of time you like. The values
are equal to the amount of days (1 week = 7 days).
If you would like to allow users to place an ad for longer than one year you
will also need to search for 366 in the script and change this number to
1 above the number of days you would like to allow the user to place the ad. For
example, if you would like users to be able to place an ad for 2 years you would
change this number to 731 (365 days * 2 + 1).
Open upload.cgi and change the first line to reflect your server's path to perl.
In the configuration section of upload.cgi you will need to set the following variables:
$config{'basedir'}
This is the path to your uploaded image directory. This should be the same as $config{'imageuploaddir'} in classifieds.cgi.
$config{'basedir'}
The URL to your uploaded image directory.
$config{'windows'}
This one is easy :) If you are on a Windows server enter "yes", if not enter "no". This will automatically chmod the image for you if you are on a Unix server.
$config{'returnurl'}
The full URL to your classifieds script.
$config{'mailerror'}
The e-mail address of the site administrator.
- Upload classifieds.cgi and upload.cgi to your CGI directory. Be sure to upload in ASCII
mode. Chmod these files to 755.
- Upload index.txt to the CGI directory where you uploaded classifieds.cgi.
Be sure to upload in ASCII mode. If you changed the name of classifieds.cgi,
you will need tochange my $configfile in index.txt to the name of your
classifieds script.
- Upload camera.gif to your CGI directory. You must use binary mode to
upload this file. If your web host does not allow images in the CGI directory,
you may upload this file to your images directory. If you upload this file to
your image directory or another directory you must edit the classifieds.cgi
file. Simply use the find function in your text editor and search for
camera.gif, then add the url or path to this file before
camera.gif.
To access the script go
to:
http://www.yourdomain.com/cgi-directory/classifieds.cgi.
To
access the administration panel go
to:
http://www.yourdomain.com/cgi-directory/classifieds.cgi?action=adminview.
*Be
sure to replace www.yourdomain.com with your domain name or address and
change cgi-directory to the name of your CGI directory.
500 Internal
Server Error: Possible Causes
- The script was not uploaded in ASCII mode.
- The script was not chmod 755.
- The path to perl is not correct.
- There is a syntax error caused by a bad text editor or mistakes made while
editing the script.
- The server has an older version of Perl than 5.003.
The ad number must consist of alphanumeric characters only. - The
trailing slash is wrong. Try placing the trailing slash like this / at the start
and the end of the basepath. Sometimes this is necessary even when using a
Windows server.
Category directory could not be opened. - The basepath is incorrect.
If you do not know the path to your site, you will need to ask your web host.
The basepath will be the path to your site including the path from your site to
your data directory.
It is always advisable to make a
backup copy of your script before you make any modifications or changes to the
script or the HTML within the script.
CodeGirl Classifieds is built upon table percentages instead of pixels (with
exception of the admin sections - you can modify those sections) and will easily
fit anywhere in your page that you desire. The easiest way to use your HTML is
to use a standard header and footer. You can easily create a professional
looking page by inserting CodeGirl Classifieds into a table also.
If you are customizing your classifieds page beyond a typical header and
footer, the best way to determine how to configure the $config{'header'}
and $config{'footer'} is to design your site with a blank space or table
where you want the classifieds to appear. Once you have determined where you
want the classifieds to appear, insert a comment line for a marker such as
INSERT CLASSIFIEDS HERE. It will then be very easy to determine which
part of your HTML should be your head and which should be your footer.
Everything above your comment line will be your header (including the HTML,
HEAD, TITLE, and BODY tags). Everything below your comment line will
be your footer (including the ending BODY and HTML tags).
You may also change your category pages to be HTML pages instead of the
script generated category pages. To do this you simply would link your
categories to the corresponding categories of your script. If you do this,
remember to change the link for Categories at the bottom of your page to
the HTML page of your categories.
Fonts are easily changed within the script. You can either set a
BASEFONT tag for the entire page in your header or you can change the
font for each line of the script that is printed to the screen.
Unlimited technical support is offered from
30 days of product delivery date. Technical support covers the functionality of
the script and does not include custom modifications. Custom modifications are
provided at a rate of $30/hr. At the end of the 30 day period we will attempt to
give technical assistance as time permits and as long as the offer of continued
support is not abused.
To contact our support department, send an e-mail to mailto:support@codegirl.virtualave.net?subject=Classifieds
Technical Support. If you are not e-mailing us from the e-mail address you
used when registering the script, please include your name, address, and
telephone number. You may also request support on our website through the support form.
Copyright 2001 by CodeGirl
Classifieds. All rights reserved. This copyright notice must remain intact. By
installing this software you agree to the following terms and conditions. If you
do not agree to these terms and conditions, you must delete this software
immediately. This script may not be copied or modified in any way without
permission in writing from CodeGirl Classifieds. This Software Product is
licensed (not sold) to you, and CodeGirl Classifieds owns all copyright, trade
secret, patent and other proprietary rights in the Software Product. The term
"Software Product" includes all copies of the CodeGirl classifieds script and
its documentation.You are hereby granted a nonexclusive license to use the
Software Product on a single domain. You may make one copy of the Software
Product's computer program for back-up purposes only. You may not: (1) copy
(other than once for back-up purposes), distribute, rent, lease or sublicense
all or any portion of the Software Product; (3) reverse engineer, decompile or
dissemble the Software Product. You agree to keep confidential and use your best
efforts to prevent and protect the contents of the Software Product from
unauthorized disclosure or use. Transfer of the Software Product is prohibited.
Your license is automatically terminated if you transfer the Software Product.
For 90 days from the date of registration, we warrant that the media (for
example, ZIP archive) on which the Software Product is contained will be free
from defects in materials and workmanship. This warranty does not cover damage
caused by improper use or neglect. We do not warrant the contents of the
Software Product or that it will be error free. The Software Product is
furnished "As Is" and without warranty as to the performance or results you may
obtain by using the Software Product. The entire risk as to the results and
performance of the Software Product is assumed by you. The warranties in this
agreement replace all other warranties, express or implied, including any
warranties of merchantability or fitness for a particular pupose. We disclaim
and exclue all other warranties. In no event will our liability of any kind
include any special, incidental or consequential damages, including lost
profits, even if we have knowledge of the potential loss or damage. We will not
be liable for any loss or damage caused by delay in furnishing a Software
Product or any other performance under this Agreement. Our entire liability and
your exclusive remedies for our liability of any kind (including liability for
negligence except liability for personal injury caused solely by our negligence)
for the Software Product covered by this Agreement and all other performance or
nonperformance by us under or related to this Agreement are limited to the
remedies specified by this Agreement. This Agreement is effective until
terminated. You may terminate it at any time by destroying the Software Product,
including all computer programs and documentation, and erasing any copies
residing on computer equipment or storage media. This Agreement also will
terminate if you do not comply with any terms or conditions of this Agreement.
Upon such termination you agree to destroy the Software Product and erase all
copies residing on computer equipment or storage media. The Software Product is
provided to the Government only with restricted rights and limited rights. Use,
duplication, or disclosure by the Government is subject to restrictions set
forth in FAR Sections 52-227-14 and 52-227-19 or DFARS Section
52.227-7013(C)(1)(ii), as applicable. You are responsible for installation,
management and operation of the Software Product.