HFS: Template symbols: Difference between revisions

From rejetto wiki
Jump to navigation Jump to search
No edit summary
Line 15: Line 15:
; %total-out% : returns the value for the total amount of bytes sent
; %total-out% : returns the value for the total amount of bytes sent
; %total-in%  : returns the value for total amount the of bytes received
; %total-in%  : returns the value for total amount the of bytes received
; %total-downloads%  : returns the value for the number of downloads
; %total-uploads%    : returns the value for the number of uploads
; %number-addresses%  : returns the value for the current number of connected clients (IP addresses)
; %number-addresses%  : returns the value for the current number of connected clients (IP addresses)
; %number-addresses-downloading% : returns the  value for the current number of downloading clients (IP addresses)
; %number-addresses-downloading% : returns the  value for the current number of downloading clients (IP addresses)

Revision as of 05:12, 10 September 2009

Symbols list - by section

Symbols available in all sections

%style%
inserts the HTML from section [style]
%login-link%
inserts HTML from section [login-link] if no user is logged in, void otherwise
%loggedin%
inserts HTML from section [loggedin] if a user is logged in, void otherwise
%user%
returns the name of the authenticated user, void if no user is logged in
%ip%
inserts the client IP address on the page
%version%
returns the HFS version number
%timestamp%
returns the value for the date and time of the server (format is defined by OS settings)
%uptime%
returns the value for how long HFS has been running without quitting
%connections%
returns the value for the current number of connections to HFS
%speed-out%
returns the value for the current outbound speed
%speed-in%
returns the value for the current inbound speed
%total-out%
returns the value for the total amount of bytes sent
%total-in%
returns the value for total amount the of bytes received
%total-downloads%
returns the value for the number of downloads
%total-uploads%
returns the value for the number of uploads
%number-addresses%
returns the value for the current number of connected clients (IP addresses)
%number-addresses-downloading%
returns the value for the current number of downloading clients (IP addresses)
%build%
returns the HFS build number
%sequential%
returns an increasing number. if it appears 3 times in a page, it will be 1, 2 and 3...
%number-addresses-ever%
returns the number of unique IP addresses ever connected.

Symbols available in the main section

%up%
inserts HTML from section [up] if the current folder is not the root, void otherwise
%upload-link%
inserts HTML from section [upload-link] if upload is available in the current folder, void otherwise
%host%
returns the Host http header field, as sent by the browser eg. Server-URL(:port) or Server-IP(:port)
%number%
returns the value for the number of items in the current folder
%number-folders%
returns the value for the number of folders in the current folder
%number-files%
returns the value for the number of files in the current folder
%total-size%
returns the smart value for the amount of space occupied by items in the current folder
%total-kbytes%
same as %total-size%, but expressed in kilobytes
%total-bytes%
same as %total-size%, but expressed in bytes
%build-time%
returns the value for how long it took to generate the page
%files%
inserts HTML from section [files] if at least one item is present in the current folder, inserts HTML from section [nofiles] otherwise

Symbols available in section [files]

%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.
%item-archive%
Expands to the [item-archive] section if the folder is archivable.
%item-ext%
returns the extension of the current item.

Symbols available in sections [file], [folder] and [link]

%item-type%
returns file if current item is a file, folder if it's a folder, link if it's a link
%new%
inserts HTML from section [new] if the file is marked as new, void otherwise
%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]

%item-dl-count%
returns the value for the download counter (virtual folders totalize inner counters)
%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]

%item-size%
returns the value for the amount of space occupied by the item
%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

%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)
%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]

%content%
inserts the HTML from sections [ban], [deny], [not found], [unauthorized] or [overload], depending on the error code

Symbols available in section [ban]

%reason%
returns value for the ban description from the hfs.ini

Symbols available in section [progress]

%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

Symbols available in sections [progress-download-file] and [progress-upload-file]

These sections are related to file transferring.

%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
%time-left%
esteemed time of arrival

Symbols available in section [upload]

%uploaded-files%
input boxes for files to be uploaded got by pasting [upload-file] for each file
%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]

%idx%
ordinal index of the input box

Symbols available in section [upload-results]

%uploaded-files%
list of uploaded files got by pasting section[upload-success] and/or section [upload-failed] for each file
%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 sections [upload-success] and [upload-failed]

%item-name%
name of the file
%item-url%
address of the file

Symbols available in section [upload-success]

%item-size%
returns the value for the size of the uploaded file
%speed%
returns the value for the average upload speed

Symbols available in section [upload-failed]

%reason%
returns the value for the error occurred while uploading