Subversion Repositories svnkaklik

Rev

Blame | Last modification | View Log | Download

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
        <style type="text/css" title="AutoIndex Default">
                @import "stylesheet.css";
                td, th
                {
                        border: 1px solid;
                }
        </style>
        <title>AutoIndex PHP Script: Readme</title>
</head>

<body class="autoindex_body">

<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr class="paragraph"><td class="default_td">

<p>
        <strong>AutoIndex PHP Script (version 1.5.2) - Help File
        <br />by Justin Hagstrom</strong> &lt;JustinHagstrom [at] yahoo [dot] com&gt;
        <br /><span class="small">AutoIndex is provided under the terms of
        the <a class="default_a" href="license.html">GNU General Public License (GPL)</a>.</span>
</p>
<p>
        <a class="default_a" href="http://autoindex.sourceforge.net/">http://autoindex.sourceforge.net/</a>
        <br />Please post any questions or comments in the
        <a class="default_a" href="http://autoindex.sourceforge.net/forum/">forum</a>.
</p>
<p>
        To install and run the script, simply upload the contents of this
        directory to a server with PHP support (Works with all versions of
        PHP4 and PHP5).
        
        <br />Then, point your browser to the index.php file in that folder. The
        first time you do this, it will take you to a configuration page.
        
        <br />To use all the default values, just click the button at the bottom,
        or customize it however you want.
        
        <br />Information about the use of each variable is in this file.
</p>
<p>
        &nbsp;
</p>

<hr class="default_hr" />

<p>
        &nbsp;
</p>
<p>
        <strong>base_dir</strong> is the folder that will be the root of the directory listing.
        <br />This will be the starting point for the script. Nothing above this directory can be viewed, but its subfolders can.
        <br />Make sure to use forward slashes, rather than backslashes. Also, try to use a relative path if possible.
        <br />Examples:
</p>
<table cellpadding="5" cellspacing="0" style="border-collapse: collapse; border: 1px solid; border-color: #111111;">
 <tr class="paragraph">
  <td><span class="fixed_width">./</span></td>
  <td>(the folder index.php is in)</td>
 </tr>
 <tr class="paragraph">
  <td><span class="fixed_width">./some folder/</span></td>
  <td>(path relative to the php file)</td>
 </tr>
 <tr class="paragraph">
  <td><span class="fixed_width">/home/user/public_html/some_folder/</span></td>
  <td>(absolute path)</td>
 </tr>
</table>
<p>
        If you're using an absolute path, you'll need to set force_download to TRUE (this is not recommended, though. It is better to use a path relative to the php script).
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>icon_path</strong> is the path to the icons. Don't put a slash at the end.
        <br />Leave this blank to not show icons to the left of files and folders.
        <br />Examples:
</p>
<table cellpadding="5" cellspacing="0" style="border-collapse: collapse; border-color: #111111;" >
 <tr class="paragraph">
  <td><span class="fixed_width">index_icons/winxp</span></td>
  <td>(relative to the php file)</td>
 </tr>
 <tr class="paragraph">
  <td><span class="fixed_width">/index_icons/kde</span></td>
  <td>(absolute path, relative to the server root)</td>
 </tr>
</table>
<p>
        &nbsp;
</p>
<p>
        <strong>stylesheet</strong> is the path and filename of your css stylesheet.
        <br />Just modify the one that came with this, so it will match the rest of your site.<br />
        Examples:
</p>
<table cellpadding="5" cellspacing="0" style="border-collapse: collapse;  border-color: #111111;">
 <tr class="paragraph">
  <td><span class="fixed_width">stylesheet.css</span></td>
  <td>(stylesheet.css is in the same folder as the php file)</td>
 </tr>
 <tr class="paragraph">
  <td><span class="fixed_width">/some_folder/some_stylesheet.css</span></td>
  <td>(absolute path to the stylesheet)</td>
 </tr>
</table>
<p>
        &nbsp;
</p>

<hr class="default_hr" />

<p>
        <strong>Optional Variables</strong> :
</p>
<p>
        &nbsp;
</p>
<p>
        If <strong>allow_uploads</strong> is set to TRUE, people will be able to upload files to your website. <em>(Default: FALSE)</em>
        <br />But if <strong>use_login_system</strong> is also set to TRUE, you must create an account for them before they can upload.
        <br />The preset users are:
        </p><p><span class="fixed_width">
                username: admin
                <br />password: admin
                <br />&nbsp;
                <br />username: test
                <br />password: test
        </span></p><p>
        <br />If you plan to use the login system, change the passwords or create different accounts and delete these!
        <br />All registered users will be able to upload, but only admins can create/delete accounts.
        <br />Also, if you want to allow uploads, make sure the folders you want to upload to are chmod'ed to allow PHP to write there.
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>user_list</strong> contains the path to the text file where the usernames and encrypted passwords are stored.
        <br />Make sure the file is chmod'ed so PHP can read and write to it.
        <br />(This is only needed if use_login_system is set to TRUE.)
</p>
<p>
        &nbsp;
</p>
<p>
        If <strong>allow_file_overwrites</strong> is set to TRUE, when uploading a file that already exists, the file will be replaced. <em>(Default: FALSE)</em>
        <br />In other words, this will allow people to overwrite existing files by uploading new ones.
        <br />This variable only matters when allow_uploads is set to TRUE.
</p>
<p>
        &nbsp;
</p>
<p>
        If <strong>must_login_to_download</strong> is set to TRUE, users must login before they will see the list of files. <em>(Default: FALSE)</em>
        <br />(They will not be able to download or browse through files without logging in first.)
        <br />This variable only matters when use_login_system is set to TRUE.
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>banned_list</strong> contains the path to the text file where blocked IP addresses and/or hostnames are stored.
        <br />This list can be edited by logging in as an administrator, or you can directly edit the text file and add IP addresses and/or hostnames, each on a new line.
        <br />You can use wildcards in the entries (*, ?, +).
</p>
<p>
        &nbsp;
</p>
<p>
        If <strong>sub_folder_access</strong> is set to FALSE, folders will not be shown. <em>(Default: TRUE)</em>
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>index: Leave this blank unless you use php includes on your webpage.</strong>
        <br />Make sure to put "ob_start();" and "session_start();" at the top of your index file. This will make sure headers are sent correctly.
        <br />Examples:
</p>
<table cellpadding="5" cellspacing="0" style="border-collapse: collapse; border-color: #111111;">
 <tr class="paragraph">
  <td><span class="fixed_width">?id=AutoIndex</span></td>
 </tr>
 <tr class="paragraph">
  <td><span class="fixed_width">/file.php?id=thisFile</span></td>
 </tr>
</table>
<p>
        The include in your index file should look something like this:
</p>
<pre>
if (isset($_REQUEST['id']) &amp;&amp; strpos($_REQUEST['id'], '/') === false)
//if the id parameter in the URL is set, and it doesn't contain any slashes
{
        include($_REQUEST['id']); //include the file
}
</pre>
<p>
        &nbsp;
</p>
<p>
        <strong>hidden_files</strong> contains an array of strings.
        <br />If a file or folder matches any of them, it will not be displayed.
        <br />They may contain wildcards (*, +, ?). For example, to hide all php files, add '*.php' to the list, or if you want to hide all files that begin with a period, add '.*'
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>show_only_these_files</strong> contains an array of strings.
        <br />If there are any items in the array, the hidden_files variable will be disabled, and only files that are listed here will be shown.
        <br />They may contain wildcards (*, +, ?). For example, to show only .txt files, add '*.txt' to the list.
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>force_download</strong> should be set to TRUE or FALSE. <em>(Default: FALSE)</em>
        <br />If it is set to TRUE, the file will be automatically downloaded, instead of letting the person's browser decide.
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>bandwidth_limit</strong> is set to the max download speed (per client) in KB/s. 0 will turn it off.
        <br />The number can contain a decimal if you want.
        <br /><strong>NOTE</strong>: To use this feature, force_download must be set to TRUE.
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>anti_leech</strong> should be set to TRUE or FALSE. <em>(Default: FALSE)</em>
        <br />This will compare the referrer and the name of your site to make sure they clicked on a link to download a file.
        <br />Setting this equal to TRUE will prevent "leeching" by making sure they download files directly from a link on your site.
        <br />Since some people turn off referrer sending in their browser, this option is not recommended.
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>enable_searching</strong> should be set to TRUE or FALSE. <em>(Default: TRUE)</em>
        <br />If it is TRUE, people will be able to search for a file or folder containing a string.
        <br />It will search the folder you are currently in, and all subfolders.
        <br />Searching is not case sensitive.
</p>
<p>
        &nbsp;
</p>
<p>
        The <strong>log_file</strong> contains the full path to the file to write the access log.
        <br />Leave it blank to turn off logging.
        <br />The log file can be a local file, or on an FTP server.
        <br />If it's a local file on non-windows systems, make sure the log file is chmod'ed to allow PHP to write to the file.
        <br />Example:
</p>
<table cellpadding="5" cellspacing="0" style="border-collapse: collapse; border-color: #111111;">
 <tr class="paragraph">
  <td><span class="fixed_width">./log.txt</span></td>
  <td>(the folder the php file is in)</td>
 </tr>
 <tr class="paragraph">
  <td><span class="fixed_width">/home/user/public_html/some_folder/somefile.log</span></td>
  <td>(absolute path)</td>
 </tr>
 <tr class="paragraph">
  <td><span class="fixed_width">ftp://user:password@example.com/somefile.txt</span></td>
  <td>(stored on ftp server)</td>
 </tr>
</table>
<p>
        <strong>dont_log_these_ips</strong> contains an array of strings (which are IP addresses).
        <br />Any access from an IP on this list will not be written to the log file.
        <br />You can also add hostnames to the list, and use wildcards (*, +, ?).
        <br />(i.e. put your own IP in here so you don't fill up the log file when you access your site)
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>download_count</strong> contains a string which is the filename of the file to keep track of how many times files have been downloaded.
        <br />The file must be chmod'ed to allow PHP to read AND write to the file.
        <br />Leave blank to disable this feature.
        <br /><strong>NOTE</strong>: When downloading a file from an IP addresses in the dont_log_these_ips array, the count will NOT increase.
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>links_file</strong> contains the path to a text file with the URL of files that you want to be listed as links.
        <br />Separate each entry with a new line.
        <br />If you want, you can change how the links is displayed, by putting some text after a pipe ('|')
        </p><p><span class="fixed_width">
                http://autoindex.sourceforge.net|Main Site
                <br />http://autoindex.sourceforge.net/forum/|Forum
        </span></p><p>
        If no link description is present, the link itself will be displayed.
        <br /><strong>NOTE</strong>: This isn't really meant to be done by hand - you can use the built-in editor when you log in as an admin.
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>description_file</strong> contains the path to a text file with descriptions for files.
        <br />The format is: [base_dir][full filename and path][a pipe, '|'][description for file]
        <br />Here's an example: ./somefile.txt|This is a text file.
        <br />Separate each entry with a new line.
        <br /><strong>NOTE</strong>: This isn't really meant to be done by hand: you can login as an admin and click "edit description" next to any file.
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>show_dir_size</strong> should be set to TRUE or FALSE. <em>(Default: TRUE)</em>
        <br />If it is set to TRUE, the total size of the folder will be shown under size.
        <br />If it is FALSE, it will display "[dir]" under size.
        <br /><strong>NOTE</strong>: If you are trying to index many files (meaning a few thousand), you will notice a speed improvement with this turned off.
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>folder_expansion</strong> should be set to TRUE or FALSE. <em>(Default: FALSE)</em>
        <br />If it is set to TRUE, when you click on the folder icon, it will expand the folder and list its contents.
        <br />Clicking on the folder name will take you into that folder.
        <br />If it is set to FALSE, both clicking on the icon and name will take you into the folder.
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>show_folder_count</strong> should be set to TRUE or FALSE. <em>(Default: FALSE)</em>
        <br />If it is TRUE, the total number of files in a folder will be shown next to that folder.
        <br />Files are counted recursively (files in subfolders are counted).
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>header</strong> and <strong>footer</strong> are the paths to 2 files.
        <br />The files must be text files (.html .txt .php , etc...)
        <br />Header will be displayed at the top, and footer will be displayed at the bottom.
        <br />Leave blank to not include a file.
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>header_per_folder</strong> and <strong>footer_per_folder</strong> should be set to TRUE or FALSE. <em>(Default: FALSE)</em>
        <br />If they are FALSE, the header/footer will be taken from the absolute or relative path in the header/footer variable.
        <br />If they are TRUE, the current directory will be added to the beginning of the file to be included. (don't add a path to the header/footer variables - just the filename)
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>days_new</strong> contains the number of days old a file can be and still have [New] written next to it. <em>(Default: 0)</em>
        <br />If it is set to 0, this feature will be disabled.
        <br /><strong>NOTE</strong>: this can contain any number, not just a 1 or 0 value, and it can contain a decimal if you want.
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>md5_show</strong> is a feature that will let users get the md5sum of a specific file. <em>(Default: 0)</em>
        <br />If set to 0 it will be disabled.
        <br />Otherwise, the number will represent the maximum file size (in megabytes) to allow the md5sum to be calculated (I'd recommend something close to 10).
        <br />The number can contain a decimal if you want.
        <br /><strong>NOTE</strong>: PHP version 4.2.0 or higher is required for this feature to work.
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>thumbnail_height</strong> is a feature that will show thumbnails next to images. (NOTE: GDlib 2.0.1 or higher is required)
        <br />Setting it to 0 will disable this feature, and setting it to any other number will set the size of the thumbnail.
        <br />(100 is a good setting to start with.)
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>show_type_column</strong>, <strong>show_size_column</strong>, and <strong>show_date_column</strong> are set to TRUE or FALSE.
        <br />Setting them to TRUE will show the column, and setting it to FALSE will not display the column.
</p>

<hr class="default_hr" />

<p>
        <strong>Language Settings</strong>:
</p>
<p>
        &nbsp;
</p>
<p>
        <strong>lang</strong> is the default language to display the script in.
        <br />The choices are listed below...
        <br /><em>(Default: 'en')</em>
</p>
<table cellpadding="1" cellspacing="0" style="border-collapse: collapse; border-color: #111111;">
        <tr class="paragraph"><th>lang setting</th><th>Language</th></tr>
        <tr class="paragraph"><td>al</td><td>Albanian</td></tr>
        <tr class="paragraph"><td>bg</td><td>Bulgarian</td></tr>
        <tr class="paragraph"><td>ca</td><td>Catalan</td></tr>
        <tr class="paragraph"><td>cz</td><td>Czech</td></tr>
        <tr class="paragraph"><td>da</td><td>Danish</td></tr>
        <tr class="paragraph"><td>de</td><td>German</td></tr>
        <tr class="paragraph"><td>ee</td><td>Estonian</td></tr>
        <tr class="paragraph"><td>en</td><td>English</td></tr>
        <tr class="paragraph"><td>es</td><td>Spanish</td></tr>
        <tr class="paragraph"><td>fi</td><td>Finnish</td></tr>
        <tr class="paragraph"><td>fr</td><td>French</td></tr>
        <tr class="paragraph"><td>gr</td><td>Greek</td></tr>
        <tr class="paragraph"><td>he</td><td>Hebrew</td></tr>
        <tr class="paragraph"><td>hu</td><td>Hungarian</td></tr>
        <tr class="paragraph"><td>is</td><td>Icelandic</td></tr>
        <tr class="paragraph"><td>it</td><td>Italian</td></tr>
        <tr class="paragraph"><td>jp</td><td>Japanese</td></tr>
        <tr class="paragraph"><td>ko</td><td>Korean</td></tr>
        <tr class="paragraph"><td>lt</td><td>Lithuanian</td></tr>
        <tr class="paragraph"><td>lv</td><td>Latvian</td></tr>
        <tr class="paragraph"><td>ms</td><td>Malay</td></tr>
        <tr class="paragraph"><td>nl</td><td>Dutch</td></tr>
        <tr class="paragraph"><td>no</td><td>Norwegian</td></tr>
        <tr class="paragraph"><td>pl</td><td>Polish</td></tr>
        <tr class="paragraph"><td>pt_BR</td><td>Brazilian Portuguese</td></tr>
        <tr class="paragraph"><td>ro</td><td>Romanian</td></tr>
        <tr class="paragraph"><td>ru</td><td>Russian</td></tr>
        <tr class="paragraph"><td>sr_LA</td><td>Serbian (Latin)</td></tr>
        <tr class="paragraph"><td>sr_CY</td><td>Serbian (Cyrillic)</td></tr>
        <tr class="paragraph"><td>sv</td><td>Swedish</td></tr>
        <tr class="paragraph"><td>th</td><td>Thai</td></tr>
        <tr class="paragraph"><td>tr</td><td>Turkish</td></tr>
        <tr class="paragraph"><td>vi</td><td>Vietnamese</td></tr>
        <tr class="paragraph"><td>zh_CN</td><td>Chinese</td></tr>
        <tr class="paragraph"><td>zh_TW</td><td>Chinese Traditional</td></tr>
</table>
<p>
        &nbsp;
</p>
<p>
        <strong>path_to_language_files</strong> is the path where the *.php language files are located.
        <br /><em>Default:</em> <span class="fixed_width">./languages/</span>
</p>
<p>
        &nbsp;
</p>
<p>
        If <strong>select_language</strong> is set to TRUE, there will be an option at the bottom of the script for
        <br />the user to choose which language the script is displayed in. <em>(Default: FALSE)</em>
</p>

<hr class="default_hr" />

</td></tr></table>

</body>
</html>