184 lines
4.2 KiB
HTML
Executable File
184 lines
4.2 KiB
HTML
Executable File
<?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>
|
|
<title>AutoIndex PHP Script: Template Readme</title>
|
|
<style type="text/css" title="AutoIndex Default">
|
|
html, body
|
|
{
|
|
font-family: verdana, lucidia, sans-serif;
|
|
font-size: 13px;
|
|
background-color: #F0F0F0;
|
|
color: #000000;
|
|
}
|
|
h4, h5
|
|
{
|
|
text-align: center;
|
|
color: #000000;
|
|
}
|
|
a
|
|
{
|
|
color: #000000;
|
|
text-decoration: none;
|
|
}
|
|
#main
|
|
{
|
|
border: 1px solid #7F8FA9;
|
|
font-size: 13px;
|
|
padding-left: 6px;
|
|
background: #F2F6FC;
|
|
color: #000020;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h4>
|
|
<a href="http://autoindex.sourceforge.net">AutoIndex PHP Script</a>
|
|
</h4>
|
|
<h5>
|
|
Template Readme
|
|
</h5>
|
|
<p>
|
|
|
|
</p>
|
|
|
|
<div id="main">
|
|
<p>
|
|
This is a list of all the variables that can be used in the template files.
|
|
</p>
|
|
<p>
|
|
|
|
</p>
|
|
<h5>
|
|
<em>global_header.tpl</em> / <em>global_footer.tpl</em>
|
|
</h5>
|
|
<p>
|
|
Info about the current directory:
|
|
</p>
|
|
<pre>
|
|
{info:dir} the path of the current directory, including the base dir
|
|
{info:subdir} the path of the current directory, not including the base dir
|
|
{info:version} the version of AutoIndex
|
|
{info:page_time} the time (in milliseconds) it took to generate the page
|
|
</pre>
|
|
<p>
|
|
All words from the language file:
|
|
</p>
|
|
<pre>
|
|
{words:foo}
|
|
... see language file for all options
|
|
</pre>
|
|
<p>
|
|
All settings from the config file:
|
|
</p>
|
|
<pre>
|
|
{config:foo}
|
|
... see AutoIndex.conf.php for all options
|
|
</pre>
|
|
<p>
|
|
You can include another specific file using the {include} command:
|
|
</p>
|
|
<pre>
|
|
{include:filename}
|
|
</pre>
|
|
<p>
|
|
Anything between <code>/* */</code> will not be displayed in the HTML output.
|
|
</p>
|
|
<p>
|
|
|
|
</p>
|
|
<h5>
|
|
<em>table_header.tpl</em> / <em>table_footer.tpl</em>
|
|
</h5>
|
|
<p>
|
|
All previously mentioned variables, plus:
|
|
</p>
|
|
<p>
|
|
Info about current directory:
|
|
</p>
|
|
<pre>
|
|
{info:path_nav}
|
|
{info:total_files}
|
|
{info:total_folders}
|
|
{info:total_size}
|
|
{info:total_downloads}
|
|
{info:search_box}
|
|
{info:login_box}
|
|
{info:archive_link}
|
|
{info:previous_page_link}
|
|
{info:next_page_link}
|
|
{info:current_page_number}
|
|
{info:last_page_number}
|
|
</pre>
|
|
<p>
|
|
If-statements:
|
|
</p>
|
|
<pre>
|
|
{if:show_dir_size}
|
|
{if:search_enabled}
|
|
{if:use_login_system}
|
|
{if:must_login_to_download}
|
|
{if:days_new}
|
|
{if:thumbnail_height}
|
|
{if:log_file}
|
|
{if:description_file}
|
|
{if:download_count}
|
|
{if:entries_per_page}
|
|
</pre>
|
|
<p>
|
|
To end an if-statement, use <code>{end if:varibale}</code>
|
|
<br />For example, <code>{if:days_new} ... {end if:days_new}</code>
|
|
</p>
|
|
<p>
|
|
Sort modes:
|
|
</p>
|
|
<pre>
|
|
{sort:filename}
|
|
{sort:size}
|
|
{sort:m_time}
|
|
{sort:description}
|
|
{sort:downloads}
|
|
</pre>
|
|
<p>
|
|
|
|
</p>
|
|
<h5>
|
|
<em>each_file.tpl</em>
|
|
</h5>
|
|
<p>
|
|
All previously mentioned variables, plus:
|
|
</p>
|
|
<p>
|
|
Properties for individual files:
|
|
</p>
|
|
<pre>
|
|
{file:filename} the name of the file or folder
|
|
{file:link} the link to the file (using the ?dir and ?file parameters in the URL)
|
|
{file:file_ext} the file extension ("dir" for a directory)
|
|
{file:size} the size (formatted as a string)
|
|
{file:bytes} the size (in bytes)
|
|
{file:date} the date modified (formatted as a string)
|
|
{file:a_time} date and time accessed
|
|
{file:m_time} date and time modified
|
|
{file:num_subfiles} for a directory, the number of files it contains
|
|
use {file:if:is_real_dir}{file:num_subfiles}{end if}
|
|
{file:thumbnail} for images, it will display a thumbnail
|
|
{file:md5_link} a link to get the md5sum of the file
|
|
{file:downloads} the number of times this file has been downloaded
|
|
{file:description} the description of the current file
|
|
{file:icon} the icon image for the filetype
|
|
{file:parent_dir} the name of the file's parent directory
|
|
{file:tr_class} this returns "light_row" or "dark_row" for every other file
|
|
{file:if:is_file} ... {end if} true if it is a file
|
|
{file:if:is_dir} ... {end if} true if it is a folder or link to parent directory
|
|
{file:if:is_real_dir} ... {end if} true if it is a folder
|
|
{file:if:is_parent_dir} ... {end if} true if it is a link to parent directory
|
|
{do_every:x} ... {end do_every} where x is a number.
|
|
The code in between will be displayed every x files.
|
|
</pre>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |