Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
HTML & templates / Re: file delete feature, and Throwback9
« Last post by dj on July 12, 2018, 07:23:55 AM »
Remove the link from the span and add ;cursor:pointer to the style.

You can even hide the X (remove the textContent from the span):

Code: [Select]
<script>if('{.get|can delete.}') document.querySelectorAll('.del').forEach(function(userItem) {userItem.textContent=' \u2718'; userItem.addEventListener('click',function(){del(this.getAttribute("data-it"))})})</script>
Place the script before the first </body> tag


[upload]
remove frm.upbtn.disabled=true; and add  multiple to the input tag
22
HTML & templates / Re: Need help with file delete feature
« Last post by danny on July 12, 2018, 04:26:04 AM »
. . .Update: more elegant. . .
Thanks!  Yes, that is more elegant!

See if I incorporated your delete feature as intended? 

Edit: File removed, because of the better version at the next post.
23
Bug reports / Re: HFS Documentation (English)
« Last post by Mars on July 11, 2018, 03:08:22 PM »
source saved for rejetto

Quote
http://www.rejetto.com:80/wiki/index.php?title=HFS:_Template_symbols

Editing HFS: Template symbols

== 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
24
Bug reports / Re: HFS Documentation (English)
« Last post by bmartino1 on July 11, 2018, 07:16:53 AM »
http://rejetto.com/wiki/index.php?title=HFS:_Template_symbols
don't work anymore

Had to use the internet time machine to recover the page-- better copy it all and save it if you want it-- earliest copy here:

https://web.archive.org/web/20100222010632/http://www.rejetto.com/wiki/index.php?title=HFS:_Template_symbols
25
HTML & templates / Re: Chat for HFS.
« Last post by bmartino1 on July 11, 2018, 07:11:53 AM »
https://github.com/heiswayi/hfs-templates/blob/master/HFSTemplate_AllyssaFramework_v1_2.tpl

There already chat boxes in other templates on the forum such as thunder chicken of glore, etc etc...

I don't know if you asking for help on addons or just shrong something you'd like to see implemented in to hfs.

???
27
Bug reports / HFS Documentation (English)
« Last post by dj on July 10, 2018, 01:00:38 AM »
28
HTML & templates / Re: Need help with file delete feature
« Last post by dj on July 09, 2018, 12:27:37 PM »
[file]
Code: [Select]
{.if|{.get|can delete.}|<span onclick='del("%item-url%")'>x</span>.}
and add script
Code: [Select]
<script>
function del(it) {
if(!confirm("Delete "+it+"?")) return 0;
var xhr = new XMLHttpRequest();
xhr.open("POST", "%folder%")
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
xhr.onload = function() {document.write(xhr.responseText);}
xhr.send("action=delete&selection="+it)
}
</script>

tested with chrome,FF,Edge


Update: more elegant

[file]
Code: [Select]
{.if|{.get|can delete.}|<span class='del' data-it='%item-url%'>x</span>.}
and add script at the end
Code: [Select]
<script>
document.querySelectorAll('.del').forEach(function(userItem) {
  userItem.addEventListener('click',function(){del(this.getAttribute("data-it"))})
})
</script>

or use a single event handler


Update2: if {.get|can delete.} slowes down, you can try

[file]
Code: [Select]
<span class='del' data-it='%item-url%'>x</span>
and add to function del
Code: [Select]
if (!'{.get|can delete.}') return 0
29
Я использовал NOIP. С полгода всё работало, потом опять та же песня. Взял в Ростелекоме статический айпи- помогло.
30
HTML & templates / Re: Chat for HFS.
« Last post by username1565 on July 08, 2018, 07:21:42 AM »
Also, I want to recommend you all to see this:



This is web-based interface for Tox!
Here is source code: https://github.com/codedust/WebTox and there is server-side code, writed as .go files.
This must to be compiled and this is a different server.
GO-installer have over 100 MB size. Not good for downloading.

Utox, Toxcore, or http://isotoxin.im/
this all is a P2P-programs, yes this can working in LAN,
and there is, inside the p2p tox-programs, already exists server-side soft.
But tox-programs is not web-based chat. So, webTox can make this web-based.

In this case, compiled go-files code in server-side of webtox
can be included in HFS server code, and working if tox-node will be running.
But I think this will make more sence, if WebTox will be included in server-side code for tox-programs.

So I just leave this here, and you can learn Tox working principles
and include something of this in HFS.
For example, NaCl encryption, with generate private key and public key,
or DHT to make peer exchange - all this can be inside HFS.
Pages: 1 2 [3] 4 5 ... 10