CFiles Documentation - Setup

CFiles setup is an almost automatic process after the script has the vital system details from cfsettings.pl. The program detects whether the required perl modules exist, then checks for the existence and validity of your SQL server and CFiles SQL tables. ALL setup details are contained within cfsettings.pl. So this section deals with the options present in that file and what sort of input is expected by the program.
 
 Setup Options
SQL Details  
$SQL_Server Refers to your SQL server name. eg. "localhost" or "sql.myhost.com" or even just "myhost.com"
$SQL_DB The database name to use on the SQL server. Often the database is your username on commercial webhosts.
$SQL_User The username to log in to the above database. Leave blank if no username.
$SQL_Pass The password for the above username. Leave blank "" if no password.
$SQL_Pre The prefix for the tables which will be created within the database. This prefix is designed to stop the CFiles tables from overwriting tables from any other programs (Including other copies of CFiles) which may be using the same database. Usually "cfiles_' will suffice.
 
System & Paths  
$host The hostname of your web server. eg. "www.myhost.com", "myhost.com". Not the url, but just the hostname.
$docrootpath The PATH to the root of your web server. The point where you can start offering html files. eg. "/home/myusername/html". It must be the absolute path, not a relative path.
$docrooturl The URL to the root of your web server. eg. "http://www.myhost.com/" or "/" or if you have a username account, something like this "http://www.myhost.com/~username/" or this "/~username/".
$templatepath The PATH, relative or absolute, to the theme directory. eg. "/home/myusername/html/themes/sometheme"
$templateurl The URL to the theme directory. eg. "/themes/sometheme" or "/~username/themes/sometheme".
$ss_path The PATH, relative or absolute, where CFiles can read and write screenshot files. eg. "/home/myusername/html/screenshots".
$ss_url The URL where CFiles can read screenshots. eg. "/screenshots" or "/~username/screenshots".
$langpath The PATH, relative or absolute, to the language files. eg. "/home/myusername/cgi-bin/languages".
$helpurl The URL, relative or absolute, to the CFiles help files. eg. "http://www.myhost.com/help/" or "../help/". This is used to provide links to CFiles help pages.
$mailprog The path to the Sendmail program on your system. Contact your system administrator if you don't know what this is.
 
Configuration
$cf_auser Username for the master admin. The master admin can create other master admins once the script is running. "Admin" by default.
$cf_apass Password for the master admin. "Master" by default.
$cf_amail Email address for the master admin. This will be displayed to users in error messages as a contact address and will also be used as a return address for new registration emails. It is important that there be a "\" before any "@" symbols. eg. "username\@mydomain.com".
$rootcat This is the name of the fixed root category under which all other categories and files are stored. The default value is "Home" although you may change it to "Files" or anything else you like.
$sitename The name of your site or file library. This name is used in emails to new members and in page titles. Default is "Carrick IT File Library".
$pagetitle This string specifies how you want the page title to be formatted. There are 3 "tags" you can use:
%%SITENAME%% - The $sitename variable from above.
%%CATEGORY%% - The category name in which the operation is taking place.
%%OPERATION%% - The name of the current operation.

You can include some, all or none of these tags. The default value is "%%SITENAME%% - %%OPERATION%% - %%CATEGORY%%".
$sitelink The website url to your CFiles installation. You may include the cfiles.cgi filename, or if you use the included .htaccess file, simply refer to the directory. eg. "http://www.myhost.com/cgi-bin/" or "http://www.myhost.com/cgi-bin/cfiles.cgi".
$statswitch Generate stats or not. This option is for those who are using a template that does not use the stats boxes. 1=On. 0=Off. Default is "1".
$numdownloads The number of "Top Downloads" to generate for the stats box. Default is "10".
$numrated The number of "Top Rated" to generate for the stats box. Default is "10".
$numrecent The number of "Latest Files" to generate for the stats box. Default is "10".
$numnoteworthy The number of "Noteworthy" to generate for the stats box. Default is "10".
$numsearchresults The number of results to return on each page for either a search or a file listing. In a file list this helps if a category contains 50 or more files. By splitting the results up into smaller batches the program outputs a lot quicker. Default is "25".
$defaultlang The only option here is "English" at the moment, although as translations are performed, they will appear in here as a default option. If you want more information on languages in CFiles, check out the Languages page.
$allowedfiles This is a comma separated string of file extensions which are allowed to be added or imported to the library. This can help you restrict what files are picked up during an import process, or what file types people can add or submit. Deafult is "exe,zip,pdf,txt,rar".
   
 Back to index