HFS: Template: Difference between revisions

From rejetto wiki
Jump to navigation Jump to search
(section aliasing)
Line 33: Line 33:
The template is loaded at HFS startup. If no template is found, then the default one is used.
The template is loaded at HFS startup. If no template is found, then the default one is used.


== Symbols list - by section ==
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<script>msgbox("Your IP address is "+%ip%);
window.defaultStatus = "Your IP address is "+ip;document.write("<title>Your IP address is "+ip+"</title>");</script>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Pehdens And Chaela's Page </title>
<style type="text/css">
%style%
</style>
<link rel="shortcut icon" href="favicon.ico" />
<center>
<br>


=== Symbols available in all sections ===
<body>
; %style% : inserts the HTML from section [style]
%login-link%
; %login-link% : inserts HTML from section [login-link] if no user is logged in, void otherwise
%loggedin%
; %loggedin% : inserts HTML from section [loggedin] if a user is logged in, void otherwise
%upload-link%
; %user% : returns the name of the authenticated user, void if no user is logged in
<div id=folderlabel>folder</div>
; %ip% : inserts the client IP address on the page
<div id=folder>%folder%</div>
; %version% : returns the HFS version number
<div id=body>
; %timestamp% : returns the value for the date and time of the server (format is defined by OS settings)
<h6>%folder-comment%</h6>
; %uptime%  : returns the value for how long HFS has been running without quitting
%up%
; %connections% : returns the value for the current number of connections to HFS
%files%
; %speed-out% : returns the value for the current outbound speed
</div>
; %speed-in% : returns the value for the current inbound speed
<div id=footer>
; %total-out% : returns the value for the total amount of bytes sent
<br />Servertime: %timestamp% <br />  Uptime: %uptime%   <br /> Your IP Address is %ip%
; %total-in%  : returns the value for total amount the of bytes received
<br /><a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
; %number-addresses% : returns the value for the current number of connected clients (IP addresses)
<br /><a href="http://colonies.com/pehden">Check out My Colonies profile</a>
; %number-addresses-downloading% : returns the  value for the current number of downloading clients (IP addresses)
<br /><a href="http://myspace.com/pehden">Check out My Myspace profile</a>
<br />Disk space: %diskfree%
<br />
<br><a href=http://www.modmyprofile.com/ style="color:ffee00;background-color:000000;font-family:arial;font-size:9px;padding:3px;" title="Click here to make your own Profile Hit Counter">Profile Hit Counter <br><img border=0 src="http://www.modmyprofile.com/my/myspace/counter/29547.bmp" alt="Free MySpace Page Counter provided by ModMyProfile.com"></a><br><br />
<br>
<a href="http://groups.yahoo.com/group/The_Daily_Info/join">
<img src="http://us.i1.yimg.com/us.yimg.com/i/yg/img/i/us/ui/join.gif" border="0"
  alt="Click here to join The_Daily_Info"><br>Click to join The_Daily_Info</a>
</center>
</script>
</form>
</div>
</body>
</html>


=== Symbols available in the main section ===
[style]
; %up% : inserts HTML from section [up] if the current folder is not the root, void otherwise
body, th { font-family:tahoma, verdana, arial, helvetica, sans; font-weight:normal; font-size:9pt; }
; %upload-link% : inserts HTML from section [upload-link] if upload is available in the current folder, void otherwise
body { margin:0; background-color:darkgreen; padding:10px; }
; %host% : returns the Host http header field, as sent by the browser eg. Server-URL(:port) or Server-IP(:port)
p { margin:0 }
; %number% : returns the value for the number of items in the current folder
a { text-decoration:nonebackground-color:Transparent; color:black; }
; %number-folders% : returns the value for the number of folders in the current folder
a:visited { color:White; }
; %number-files% : returns the value for the number of files in the current folder
a:hover { background-color:lime; }
; %total-size% : returns the smart value for the amount of space occupied by items in the current folder
img { border-style:dot }
; %total-kbytes% : same  as '''%total-size%''', but expressed in kilobytes
td { font-size:10pt; background:darkgreen; border:1px dashed purple }
; %total-bytes%  : same as '''%total-size%''', but expressed in bytes
td img { vertical-align:top }
; %build-time% : returns the value for how long it took to generate the page
th, th a { color:purple; font-size:13pt; font-weight:bold:italic; padding-bottom:0; }
; %files%  : inserts HTML from section [files] if at least one item is present in the current folder, inserts HTML from section [nofiles] otherwise
#foldercomment { font-size:10pt; color:lime; background:darkgreen; padding:3px; border:1px dotted purple; border-bottom:3px dotted purple; margin-top:2px; }
#tools { text-align:right; font-size: 8pt; }
#folder, .big { font-size:14pt; font-weight:bold;  }
#folderlabel, #folderstats, #footer { font-size: 8pt; }
#body {
  border-bottom: 4px dotted purple;
    border-top: 4px dotted purple;
    border-left: 1px dotted purple;
  border-right: 1px dotted purple;
  background:darkgreen;
  padding:15px;
  margin:15px;
}
.comment { font-size:7pt; color:black; background:green; padding:3px; border:1px solid purple; margin-top:2px; }
.button { float:left; padding:5px; padding-top:7px; margin:15px; border:3px solid darkgreen; background:darkgreen; font-size:8pt; font-weight:bold; }
.button img { vertical-align:text-bottom; }
.flag { font-weight:bold; font-size:8pt; background:black; color:white; text-align:center; border:1px solid lime; }


=== Symbols available in section [files] ===  
[login-link]
; %list% : the full list of items in the current folder, got by pasting each item after the pertinent section where [folder], [file] or [link] was inserted.
<a href="%encoded-folder%~login" class=button><img src="/~img27" /> LOGIN</a>


=== Symbols available in sections [file], [folder] and [link] ===
[loggedin]
; %new% : inserts HTML from section [new] if the file is marked as new, void otherwise
<span class=button><img src="/~img27" /> user: %user% /Your Ip is: %ip%</span>
; %comment% : inserts HTML from section [comment] if a comment is available for the item, void otherwise
; %item-url% : returns the value for the path to get the item
; %item-name% : returns the value for the label of the item
; %item-folder% : returns the path to the item, not in URL format. Most times it is the same as %folder%, but it is different for recursive listings.
; %item-added% : returns the value for date and time when the item was added to the VFS (date and time format is defined by OS settings)


=== Symbols available in sections [file] and [folder] ===
[upload-link]
; %item-dl-count% : returns the value for the download counter (virtual folders totalize inner counters)
<a href="%encoded-folder%~upload" class=button><img src="/~img32" /> UPLOAD</a>
; %item-modified% : returns the value for the modification time as reported by file or folder (date and time format is defined by OS settings)


=== Symbols available in section [file] ===
[up]
; %item-size% : returns the value for the amount of space occupied by the item
<a class=big href=".."><img src="/~img14" /> UP</a>
; %item-size-b% : same as '''%item-size%''', but expressed in bytes
; %item-size-kb% : same as '''%item-size%''', but expressed in kilobytes


=== Symbols available in sections [upload], [upload+progress], [upload-results] and main section ===
[nofiles]
; %diskfree% : returns the value for the total amount of available space minus the reserved space in the drive containing the current folder (makes sense only for real folders)
<div class=big>No files</div>
; %folder% : returns the value for the path to the current folder
; %encoded-folder% : returns the value for the encoded path to the current folder
; %parent-folder% : returns the value for the encoded path to the parent folder
; %folder-comment% : inserts the HTML from section [folder-comment] if a comment is available for the current folder, void otherwise


=== Symbols available in section [error-page] ===
[files]
; %content% : inserts the HTML from sections [ban], [deny], [not found], [unauthorized] or [overload], depending on the error code
<div id=folderstats>%number-folders% folders,  %number-files% files - Total: %total-size%</div>
<table cellpadding=5>
<th><a href="%encoded-folder%?sort=n">Filename</a>
<th><a href="%encoded-folder%?sort=s">Filesize</a>
<th><a href="%encoded-folder%?sort=t">Filetime</a>
<th><a href="%encoded-folder%?sort=d">Hits</a>
%list%
</table>
<div id=tools>
<a href="%encoded-folder%~files.lst?recursive">File list</a>
</div>


=== Symbols available in section [ban] ===
[file]
; %reason% : returns value for the ban description from the hfs.ini
<tr><td>%new% <a href="%item-url%"><img src="/~img_file" /> %item-name%</a>%comment%<td align=right>%item-size%<td align=right>%item-modified%<td align=right>%item-dl-count%


=== Symbols available in section [progress] ===
[folder]
; %progress-files% : inserts the HTML from section [progress-nofiles] if no file is transferred with the current client, otherwise the list of transferring files got by pasting each file after the pertinent section [progress-download-file] and/or [progress-upload-file] is inserted
<tr><td>%new% <a href="%item-url%"><img src="/~img_folder" /> <b>%item-name%</b></a>%comment%<td align=center><i>folder</i><td align=right>%item-modified%<td align=right>%item-dl-count%


=== Symbols available in sections [progress-download-file] and [progress-upload-file] ===
[link]
These sections are related to file transferring.
<tr><td>%new% <a href="%item-url%"><img src="/~img_link" /> <b>%item-name%</b></a>%comment%<td colspan=3 align=center><i>link</i>
; %perc% : returns the value for the percentage done
; %filename% : returns the value for the name of the file
; %done-bytes% : returns the value for the transferred bytes
; %done% : same  as '''%done-bytes%''', but using dynamic measure units
; %total-bytes% : returns the value for the number of bytes of the completed transfer
; %total% : same as '''%total-bytes%''', but using dynamic measure units
; %speed-kb% : returns the value for the throughput speed


[comment]
<div class=comment>%item-comment%</div>


=== Symbols available in section [upload] ===
[folder-comment]
; %uploaded-files% : input boxes for files to be uploaded got by pasting [upload-file] for each file
<div id=foldercomment>%item-comment%</div>
; %host% : returns the Host http header field, as sent by the browser eg. Server-URL(:port) or Server-IP(:port) (since v2.1beta)
; %up%  : inserts HTML from section [up] if the current folder is not the root, void otherwise (since v2.1beta)


=== Symbols available in section [upload-file] ===
[error-page]
; %idx% : ordinal index of the input box
<html><head><style>\n%style%\n</style></head><body>
%content%
<hr>
<div style="font-family:tahoma, verdana, arial, helvetica, sans; font-size:8pt;">
<center>
<br />Servertime: %timestamp% <br />  Uptime: %uptime%  <br />  Your IP Address is %ip%
<br /><a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<br /><a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<br /><a href="http://myspace.com/pehden">Check out My Myspace profile</a>
<br />Disk space: %diskfree%
</center>
</div>
</body>
</html>


=== Symbols available in section [upload-results] ===
[not found]
; %uploaded-files% : list of uploaded files got by pasting section[upload-success] and/or section [upload-failed] for each file
<h1>404 - Not found.....Hmmm How the hell that happened I dont know...I must have done something wrong, well maybe...
; %host% : returns the Host http header field, as sent by the browser eg. Server-URL(:port) or Server-IP(:port) (since v2.1beta)
<a href="/">Back</a></h1>
; %up% : inserts HTML from section [up] if the current folder is not the root, void otherwise (since v2.1beta)
<center>
<br />Servertime: %timestamp% <br />  Uptime: %uptime%  <br />  Your IP Address is %ip%
<br /><a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<br /><a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<br /><a href="http://myspace.com/pehden">Check out My Myspace profile</a>
<br />Disk space: %diskfree%
</center>


=== Symbols available in sections [upload-success] and [upload-failed] ===
[overload]
; %item-name% : name of the file
<h1>Server busy</h1>
; %item-url% : address of the file
Please, retry later.
<center>
<br />Servertime: %timestamp% <br />  Uptime: %uptime%  <br />  Your IP Address is %ip%
<br /><a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<br /><a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<br /><a href="http://myspace.com/pehden">Check out My Myspace profile</a>
<br />Disk space: %diskfree%
</center>


=== Symbols available in section [upload-success] ===
[max contemp downloads]
; %item-size% : returns the value for the size of the uploaded file
<h1>Download limit</h1>
; %speed% : returns the value for the average upload speed
On this server there is a limit on the number of <b>simultaneous</b> downloads.
<br />This limit has been reached. Retry later.
<center>
<br />Servertime: %timestamp% <br />  Uptime: %uptime%  <br />  Your IP Address is %ip%
<br /><a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<br /><a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<br /><a href="http://myspace.com/pehden">Check out My Myspace profile</a>
<br />Disk space: %diskfree%
</center>


=== Symbols available in section [upload-failed] ===
[unauthorized]
; %reason% : returns the value for the error occurred while uploading
<h1>Unauthorized...</h1>
This is a protected resource.
<br />Your username/password doesn't match.
<center>
<br />Servertime: %timestamp% <br />  Uptime: %uptime%  <br />  Your IP Address is %ip%
<br /><a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<br /><a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<br /><a href="http://myspace.com/pehden">Check out My Myspace profile</a>
<br />Disk space: %diskfree%
</center>
 
[deny]
<h1>Unallowed</h1>
This resource is not accessible.
<center>
<br />Servertime: %timestamp% <br />  Uptime: %uptime%  <br />  Your IP Address is %ip%
<br /><a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<br /><a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<br /><a href="http://myspace.com/pehden">Check out My Myspace profile</a>
<br />Disk space: %diskfree%
</center>
 
[ban]
<h1>You are banned. Your Ip is %ip%</h1>
%reason%
<center>
<br />Servertime: %timestamp% <br />  Uptime: %uptime%  <br />  Your IP Address is %ip%
<br /><a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<br /><a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<br /><a href="http://myspace.com/pehden">Check out My Myspace profile</a>
<br />Disk space: %diskfree%
</center>
 
[upload]
<html>
<head>
<title>HFS %folder%</title>
<style>\n%style%\n</style>
</head>
<body>
%login-link%
%loggedin%
<script language="javascript">
var s1, s2;
if (window.parent.progress) s1 = '" target=_parent', s2 = 'CLOSE';
else s1 = '+progress"', s2= 'ADD';
document.write('<a href="%encoded-folder%~upload'+s1+' class=button onClick="if (frm.upbtn.disabled) return false;"><img src="/~img10" /> '+s2+' PROGRESS FRAME</a>');
</script>
<a href="%encoded-folder%" target=_parent class=button><img src="/~img21" /> CANCEL UPLOAD</a>
<div style="margin-top:60px" id=folderlabel>folder</div>
<div id=folder>%folder%</div>
<div id=body>
<form name=frm action="%encoded-folder%" target=_parent method=post enctype="multipart/form-data" onSubmit="frm.upbtn.disabled=true; return true;">
%upload-files%
<input name=upbtn type=submit value="Upload files">
</form>
<br />Before uploading you may want to open a <a target=_blank href="/~progress">progress status window</a>.
</div>
<div id=footer>
<center>
<br />Servertime: %timestamp% <br />  Uptime: %uptime%  <br />  Your IP Address is %ip%
<br /><a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<br /><a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<br /><a href="http://myspace.com/pehden">Check out My Myspace profile</a>
<br />Disk space: %diskfree%
</center>
</div>
</body>
</html>
 
[upload-file]
<input name=fileupload%idx% size=70 type=file><br />
<center>
<br />Servertime: %timestamp% <br />  Uptime: %uptime%  <br />  Your IP Address is %ip%
<br /><a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<br /><a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<br /><a href="http://myspace.com/pehden">Check out My Myspace profile</a>
<br />Disk space: %diskfree%
</center>
 
[upload-results]
<html>
<head>
<title>HFS %folder%</title>
<style>\n%style%\n</style>
</head>
<body>
%loggedin%
<div style="margin-top:60px" id=folderlabel>folder</div>
<div id=folder>%folder%</div>
<div id=body>
%uploaded-files%
<br /><br />
<a href="%encoded-folder%" target=_parent class=big><img src="/~img14" /> Back to the folder</a>
</div>
<div class=footer>
<br />Servertime: %timestamp% <br />  Uptime: %uptime%  <br />  Your IP Address is %ip%
<br /><a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<br /><a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<br /><a href="http://myspace.com/pehden">Check out My Myspace profile</a>
<br />Disk space: %diskfree%
</div>
</body>
</html>
 
[upload-success]
<li>%item-name%: <b>OK</b> --- %item-size%  (Speed %speed% KB/s)
<center>
<br />Servertime: %timestamp% <br />  Uptime: %uptime%  <br />  Your IP Address is %ip%
<br /><a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<br /><a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<br /><a href="http://myspace.com/pehden">Check out My Myspace profile</a>
<br />Disk space: %diskfree%
</center>
 
[upload-failed]
<li>%item-name%: <b>FAILED</b> ---  %reason%
<center>
<br />Servertime: %timestamp% <br />  Uptime: %uptime%  <br />  Your IP Address is %ip%
<br /><a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<br /><a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<br /><a href="http://myspace.com/pehden">Check out My Myspace profile</a>
<br />Disk space: %diskfree%
</center>
 
[upload+progress]
<html>
<head>
<frameset cols=200,*>
  <frame name=progress src="/~progress" scrolling=auto marginwidth=0>
  <frame src="%encoded-folder%~upload-no-progress" scrolling=auto>
</frameset>
</head>
<body>
</body>
</html>
 
[progress]
<html>
<head>
<meta http-equiv="Refresh" content="7;URL=/~progress">
<title>HFS - Progress status</title>
<style>
%style%
.filename { font-weight:bold; font-size:8pt; }
.bytes { font-size:7pt; }
.perc { font-size:14px; vertical-align:middle; }
.out_bar { width:100px; font-size:15px; background:black; border:black 1px solid; margin-right:5px; float:left; }
.in_bar { height:16px; background:white; color:white;  }
#body { margin-left:0; margin-right:0; }
body { padding:2px; }
#graph { border:white outset 2px; }
</style>
</head>
<body>
<div class=big>Progress status</div>
Auto-refresh: 7 seconds
<br /><br /><img src="/~img_graph190x40" id="graph" />
<div id=body>
%progress-files%
</div>
<div id=footer>Uptime: %uptime%</div>
</body>
</html>
 
[progress-nofiles]
<div class=big>No file exchange in progress.</div>
 
[progress-upload-file]
<span class=flag>&nbsp;up&nbsp;</span>
<span class=filename>%filename%</span>
<div class=bytes>
%done-bytes% / %total-bytes% bytes
<br />Speed: %speed-kb% KB/s
</div>
<div style="margin-top:5px; margin-bottom:20px;">
  <div class=out_bar><div class=in_bar style="width:%perc%px"></div></div> <span class=perc>%perc%%</span>
</div>
 
[progress-download-file]
<span class=flag>&nbsp;down&nbsp;</span>
<span class=filename>%filename%</span>
<div class=bytes>
%done-bytes% / %total-bytes% bytes
<br />Speed: %speed-kb% KB/s
</div>
<div style="margin-top:5px; margin-bottom:20px;">
  <div class=out_bar><div class=in_bar style="width:%perc%px"></div></div> <span class=perc>%perc%%</span>
</div>
 
[newfile]
<span class=flag>&nbsp;NEW&nbsp;</span>


== Address line operators list ==
== Address line operators list ==

Revision as of 21:19, 9 February 2007

In HFS 2.1, some of the procedural information in this section is now outdated. Although almost all the detail about sections and symbols etc. is still correct, you should obviously use the new HTML Template Editor.


Applying templates from the forum

You can download templates from the HFS templates forum or from the HFS Template Gallery. To apply a template, follow these steps:

  1. Open the "Menu" in HFS.
  2. Select "Other options" and open "Edit HTML template".
  3. Copy your HTML template and paste it over the HFS "HTML template".

Test your new HTML template by pressing the "apply" button and reloading the HFS web page into your browser.

Building your own HTML template

1. Open the "Menu" in HFS.

2. Select "Other options" and open "Edit HTML template".

3. Press the "Help" button to list the available symbols for your HTML template.

How templates work

HFS builds HTML pages dynamically by loading pieces of HTML code from a template. A template is text divided into sections. Each section describes a part of the final HTML page which will be served to the requesting browser. The template must provide all sections for correct working of the generated HTML, so a section usually contains HTML code. Since the final HTML page is built dynamically, symbols have to be used to get valid output. Symbols are surrounded by %percent% characters and define the corresponding sections. A section is labelled by using [square brackets]. Symbols will be translated into actual values at run-time. Some symbols return a string for the current variable, while others only get activated if a certain condition is met. Besides symbols, some defined address line operators can also call sections to generate HTML for output.

In the main section, which is unlabeled, and in all other sections, symbols can be used to control the HTML output. Some symbols are limited to a specific section. Some symbols will produce the HTML from the corresponding sections, while others just return the corresponding actual string or value.

The best way to build a template is to edit an existing template.

Where is the template stored

The template is stored always "near" the options. If the options are saved in disk (file hfs.ini) then the template is also saved to disk (file named hfs.tpl). You can find these files in the same folder as hfs.exe (the software). More often, both the template and the options are saved in the registry (by default).

The template is loaded at HFS startup. If no template is found, then the default one is used.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <script>msgbox("Your IP address is "+%ip%); window.defaultStatus = "Your IP address is "+ip;document.write("<title>Your IP address is "+ip+"</title>");</script> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title>Pehdens And Chaela's Page </title> <style type="text/css"> %style% </style> <link rel="shortcut icon" href="favicon.ico" />


<body> %login-link% %loggedin% %upload-link%

folder
%folder%
%folder-comment%

%up% %files%

</script> </form>

</body> </html>

[style] body, th { font-family:tahoma, verdana, arial, helvetica, sans; font-weight:normal; font-size:9pt; } body { margin:0; background-color:darkgreen; padding:10px; } p { margin:0 } a { text-decoration:none; background-color:Transparent; color:black; } a:visited { color:White; } a:hover { background-color:lime; } img { border-style:dot } td { font-size:10pt; background:darkgreen; border:1px dashed purple } td img { vertical-align:top } th, th a { color:purple; font-size:13pt; font-weight:bold:italic; padding-bottom:0; }

  1. foldercomment { font-size:10pt; color:lime; background:darkgreen; padding:3px; border:1px dotted purple; border-bottom:3px dotted purple; margin-top:2px; }
  2. tools { text-align:right; font-size: 8pt; }
  3. folder, .big { font-size:14pt; font-weight:bold; }
  4. folderlabel, #folderstats, #footer { font-size: 8pt; }
  5. body {
 border-bottom: 4px dotted purple;
    border-top: 4px dotted purple;
   border-left: 1px dotted purple;
  border-right: 1px dotted purple;
 background:darkgreen;
 padding:15px;
 margin:15px;

} .comment { font-size:7pt; color:black; background:green; padding:3px; border:1px solid purple; margin-top:2px; } .button { float:left; padding:5px; padding-top:7px; margin:15px; border:3px solid darkgreen; background:darkgreen; font-size:8pt; font-weight:bold; } .button img { vertical-align:text-bottom; } .flag { font-weight:bold; font-size:8pt; background:black; color:white; text-align:center; border:1px solid lime; }

[login-link] <a href="%encoded-folder%~login" class=button><img src="/~img27" /> LOGIN</a>

[loggedin] <img src="/~img27" /> user: %user% /Your Ip is: %ip%

[upload-link] <a href="%encoded-folder%~upload" class=button><img src="/~img32" /> UPLOAD</a>

[up] <a class=big href=".."><img src="/~img14" /> UP</a>

[nofiles]

No files

[files]

%number-folders% folders, %number-files% files - Total: %total-size%
<a href="%encoded-folder%?sort=n">Filename</a> <a href="%encoded-folder%?sort=s">Filesize</a> <a href="%encoded-folder%?sort=t">Filetime</a> <a href="%encoded-folder%?sort=d">Hits</a>

%list%

<a href="%encoded-folder%~files.lst?recursive">File list</a>

[file]

%new% <a href="%item-url%"><img src="/~img_file" /> %item-name%</a>%comment%%item-size%%item-modified%%item-dl-count%

[folder]

%new% <a href="%item-url%"><img src="/~img_folder" /> %item-name%</a>%comment%folder%item-modified%%item-dl-count%

[link]

%new% <a href="%item-url%"><img src="/~img_link" /> %item-name%</a>%comment%link

[comment]

%item-comment%

[folder-comment]

%item-comment%

[error-page] <html><head><style>\n%style%\n</style></head><body> %content%



Servertime: %timestamp%
Uptime: %uptime%
Your IP Address is %ip%
<a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<a href="http://myspace.com/pehden">Check out My Myspace profile</a>
Disk space: %diskfree%

</body> </html>

[not found]

404 - Not found.....Hmmm How the hell that happened I dont know...I must have done something wrong, well maybe... <a href="/">Back</a>


Servertime: %timestamp%
Uptime: %uptime%
Your IP Address is %ip%
<a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<a href="http://myspace.com/pehden">Check out My Myspace profile</a>
Disk space: %diskfree%

[overload]

Server busy

Please, retry later.


Servertime: %timestamp%
Uptime: %uptime%
Your IP Address is %ip%
<a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<a href="http://myspace.com/pehden">Check out My Myspace profile</a>
Disk space: %diskfree%

[max contemp downloads]

Download limit

On this server there is a limit on the number of simultaneous downloads.
This limit has been reached. Retry later.


Servertime: %timestamp%
Uptime: %uptime%
Your IP Address is %ip%
<a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<a href="http://myspace.com/pehden">Check out My Myspace profile</a>
Disk space: %diskfree%

[unauthorized]

Unauthorized...

This is a protected resource.
Your username/password doesn't match.


Servertime: %timestamp%
Uptime: %uptime%
Your IP Address is %ip%
<a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<a href="http://myspace.com/pehden">Check out My Myspace profile</a>
Disk space: %diskfree%

[deny]

Unallowed

This resource is not accessible.


Servertime: %timestamp%
Uptime: %uptime%
Your IP Address is %ip%
<a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<a href="http://myspace.com/pehden">Check out My Myspace profile</a>
Disk space: %diskfree%

[ban]

You are banned. Your Ip is %ip%

%reason%


Servertime: %timestamp%
Uptime: %uptime%
Your IP Address is %ip%
<a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<a href="http://myspace.com/pehden">Check out My Myspace profile</a>
Disk space: %diskfree%

[upload] <html> <head> <title>HFS %folder%</title> <style>\n%style%\n</style> </head> <body> %login-link% %loggedin% <script language="javascript"> var s1, s2; if (window.parent.progress) s1 = '" target=_parent', s2 = 'CLOSE'; else s1 = '+progress"', s2= 'ADD'; document.write('<a href="%encoded-folder%~upload'+s1+' class=button onClick="if (frm.upbtn.disabled) return false;"><img src="/~img10" /> '+s2+' PROGRESS FRAME</a>'); </script> <a href="%encoded-folder%" target=_parent class=button><img src="/~img21" /> CANCEL UPLOAD</a>

folder
%folder%

<form name=frm action="%encoded-folder%" target=_parent method=post enctype="multipart/form-data" onSubmit="frm.upbtn.disabled=true; return true;"> %upload-files% <input name=upbtn type=submit value="Upload files"> </form>
Before uploading you may want to open a <a target=_blank href="/~progress">progress status window</a>.

</body> </html>

[upload-file] <input name=fileupload%idx% size=70 type=file>


Servertime: %timestamp%
Uptime: %uptime%
Your IP Address is %ip%
<a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
<a href="http://colonies.com/pehden">Check out My Colonies profile</a>
<a href="http://myspace.com/pehden">Check out My Myspace profile</a>
Disk space: %diskfree%

[upload-results] <html> <head> <title>HFS %folder%</title> <style>\n%style%\n</style> </head> <body> %loggedin%

folder
%folder%

%uploaded-files%

<a href="%encoded-folder%" target=_parent class=big><img src="/~img14" /> Back to the folder</a>

</body> </html>

[upload-success]

  • %item-name%: OK --- %item-size% (Speed %speed% KB/s)


    Servertime: %timestamp%
    Uptime: %uptime%
    Your IP Address is %ip%
    <a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
    <a href="http://colonies.com/pehden">Check out My Colonies profile</a>
    <a href="http://myspace.com/pehden">Check out My Myspace profile</a>
    Disk space: %diskfree%

    [upload-failed]

  • %item-name%: FAILED --- %reason%


    Servertime: %timestamp%
    Uptime: %uptime%
    Your IP Address is %ip%
    <a href="http://profiles.yahoo.com/pehden">Check out My Yahoo profile</a>
    <a href="http://colonies.com/pehden">Check out My Colonies profile</a>
    <a href="http://myspace.com/pehden">Check out My Myspace profile</a>
    Disk space: %diskfree%

    [upload+progress] <html> <head> <frameset cols=200,*>

     <frame name=progress src="/~progress" scrolling=auto marginwidth=0>
     <frame src="%encoded-folder%~upload-no-progress" scrolling=auto>
    

    </frameset> </head> <body> </body> </html>

    [progress] <html> <head> <meta http-equiv="Refresh" content="7;URL=/~progress"> <title>HFS - Progress status</title> <style> %style% .filename { font-weight:bold; font-size:8pt; } .bytes { font-size:7pt; } .perc { font-size:14px; vertical-align:middle; } .out_bar { width:100px; font-size:15px; background:black; border:black 1px solid; margin-right:5px; float:left; } .in_bar { height:16px; background:white; color:white; }

    1. body { margin-left:0; margin-right:0; }

    body { padding:2px; }

    1. graph { border:white outset 2px; }

    </style> </head> <body>

    Progress status

    Auto-refresh: 7 seconds

    <img src="/~img_graph190x40" id="graph" />

    %progress-files%

    </body> </html>

    [progress-nofiles]

    No file exchange in progress.

    [progress-upload-file]  up  %filename%

    %done-bytes% / %total-bytes% bytes
    Speed: %speed-kb% KB/s

    %perc%%

    [progress-download-file]  down  %filename%

    %done-bytes% / %total-bytes% bytes
    Speed: %speed-kb% KB/s

    %perc%%

    [newfile]  NEW 

    Address line operators list

    Address line operators can be used in HTML eg. href="/~login" and in the address command line of the browser eg. www.yoursite.com/~login.

    ~nodefault
    doesn't serve default file in a folder, but folder with files (since v2.1beta)
    ~login
    calls for the login screen
    ~files.lst
    inserts HTML from filelist.tpl if exists in hfs.exe folder, otherwise produces ASCII file list of the requested folder
    ~img
    shows server graphic
    ~progress
    calls the HTML from section [progress]
    ~upload
    calls HTML from section [upload] for the requested folder
    ~upload-no-progress
    calls HTML from section [upload-no-progress] for requested folder
    ~upload+progress
    calls HTML from section [upload+progress] for the requested folder

    Sections list

    Sections available in the template:

    [style]
    HTML for the %style% symbol
    [login-link]
    HTML for the %login-link% symbol when no user is logged in
    [loggedin]
    HTML for the %loggedin% symbol when the user has logged in
    [up]
    HTML for the %up% symbol when there's a parent folder (not root)
    [link]
    HTML for the a link to an URL
    [folder]
    HTML for the link to a folder
    [file]
    HTML for the link to a file
    [file.<EXT>]
    used in place of [file] when the file has the specified extention
    [files]
    HTML for the %files% symbol when the current folder is not empty
    [nofiles]
    HTML for the %files% symbol when the current folder is empty
    [comment]
    HTML for the %comment% symbol for sections [file], [folder] and [link] if available in the VFS
    [folder-comment]
    HTML for the %folder-comment% symbol if available in the VFS
    [newfile]
    HTML for the %new% symbol if the item is marked as new
    [upload-link]
    HTML for the %upload-link% symbol when the user has upload rights
    [upload]
    HTML for the ~upload command
    [upload-file]
    HTML for the upload form
    [upload-results]
    HTML for the upload results page after upload has finished
    [upload-success]
    HTML for the successfully uploaded files
    [upload-failed]
    HTML for the unsuccessfully uploaded files
    [progress]
    HTML for the %progress% symbol
    [progress-download-file]
    HTML for ongoing download
    [progress-upload-file]
    HTML for ongoing upload
    [progress-nofiles]
    HTML when no file transfer is ongoing
    [upload-no-progress]
    HTML for the ~upload-no-progress command
    [upload+progress]
    HTML for the ~upload+progress command
    [error-page]
    HTML in case of an error
    [overload]
    HTML for the %content% symbol
    [unauthorized]
    HTML for the %content% symbol
    [deny]
    HTML for the %content% symbol
    [ban]
    HTML for the %content% symbol
    [max contemp downloads]
    HTML for the %content% symbol
    [not-found]
    HTML for the %content% symbol

    Section aliasing

    You can specify 2 or more sections in brackets, and the same content will be assigned to all of them.

    The syntax is [A = B = C = D] where A, B, C, etc, are sections.

    This is very useful when you are specifying the content for [file.EXT] sections, like images. [file.jpg = file.jpeg = file.png = file.gif]

    Customizing graph colors and size

    Available since build #081.

    You can customize graph colors inside the template. The graph address is ~img_graph, but you can append to the name several options separated by an x.

    For example, ~img_graph190x40xx333x000

    The full list of options, in order is: width, height, refresh rate, background color, grid color, out bandwidth color, in bandwidth color, text color.

    You can specify as many options as you want, even none. Current default values for width/height/colors are the same as in HFS window.

    Colors can be specified in at least two forms: RGB, RRGGBB.

    Refresh rate doesn't work inside template itself, but only if you access the graph alone, directly in your browser. If not specified, refresh is disabled.