All the configuration of the code is done in one file - include/Config.asp. I'll discuss just the lines that you have to change. // ============================================
// database configuration
// ============================================
// OLE DB Provider constants
var sAccess9x = 'Microsoft.Jet.OLEDB.2.5';
var sAccess97 = 'Microsoft.Jet.OLEDB.3.51';
var sAccess2000 = 'Microsoft.Jet.OLEDB.4.0';
var sSQLServer = 'SQLOLEDB.1';
// which am I using?
var sDBDriver = sAccess97;
|
In the database section of the file change sDBDriver to whatever database you are using. The database I ship in the download is in Access 97 format, and if you have Access 97 or Access 2000 the default will probably work. // ============================================
// email configuration - please tell me of other servers you want
// ============================================
// Email server constants
var nEmailCDONTS = 826;
var nEmailJMAIL = 657;
var nEmailASPMAIL = 781;
var nEmailASPEMAIL = 167;
// which am I using?
var nEmailServer = nEmailCDONTS;
// the host domain used to send / receive emails
var sHostDomain = "__yourdomain.com";
|
Similarly, set the email component that you are using. CDONTS is the default, which will work fine on Windows machines if you have the SMTP service installed. Before you can get the site to send you emails you'll have to set the sHostDomain to your domain. If you don't have your own domain, search for sHostDomain throughout the code, and change the code as necessary. // ============================================
// password configuration - set this to your password and change often!
// ============================================
var sPassword = 'SECRET';
|
As discussed in Security.asp you need a password to fully access some pages. This is where you set your password. // ============================================
// page counter and statistics gathering
// ============================================
var bStoreStats = false;
|
To enable statistics gathering, set the bStoreStats flag to true. // ============================================
// cookies
// ============================================
var sCookieEmail = 'MemberEmail';
var sCookiePassword = 'MemberPassword';
|
When cookies are used to store the members email address and password, the names of the cookies are specified here. I recommend that you set them to something more specific to your site - mine all start CYA... // ============================================
// base href - the URL of your pages
// ============================================
// if a string in sURLTest is found, then the offset is applied from
// sURLOffset. As an example, I want my base hrefs to be
// http://CoverYourASP.com/ on production server and
// http://localhost/cya/ on development server.
var sURLTest = new Array (
'.com', // if this found in server name..
'localhost'
);
var sURLOffset = new Array (
'', // ..apply this offset
'cya'
);
|
Specify here the servers that you'll run the site on, and the sub-folders that you'll use, if any. more... Problems?Please tell me what problems you encounter, so I can help you! Q. I'm lost. How do I setup my PC to run ASP, install your site and maybe later modify it? A. I have new articles that contain full step-by-step instructions on how to install PWS, install my code and troubleshoot any errors you might encounter. |