Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - LeoNeeson

Pages: [1] 2 3 ... 30
HTML & templates / Re: Chat for HFS.
« on: July 16, 2018, 02:25:05 AM »
@username1565: Your idea is very interesting. I've tested it, and it works well, but I've also found some issues and ideas for enhancements.

Possible small enhancements:
- (Bug) if we insert ":" in a message, then any text/word after that is not shown.
- Automatically scroll-down messages, so we can always see the last posted message.
- Show the number of users online, or even better, have a simple online user list.
- Save/remember nickname on a cookie, and allow change nickname when clicking on it.
- Add an optional 'Send' button (as a fail-over, for old browsers not detecting when the 'Enter' key is pressed).

Possible complex enhancements:
- Privacy: If possible, save messages using the epoch Unix Time, to avoid someone automatically stealing all the messages, since it's currently searching for "message (2).txt", "message (3).txt", etc. which can be easily guessed. But since this can be very complex to implement, I have another better idea:

- Add a private chat mode: when a private chat with some user is started, a new window is opened, and a new -temporal- folder is created on HFS, with a random folder name (for example "TempChat-5560AFHG"), so, another users can't guess the folder path and steal or retrieve private chats. Folder name should be automatically exchanged in background, without user intervention. And when one of the users close your browser, the private chat ends, and the another user gets a message like 'John has closed this chat' (similar as IRC). And then, we can also automatically delete that temporal folder, when both parts close the window. We can also create a -permanent- private chat (with a folder name like "PermChat-EASY777"), adding a button to make it, so if 2 users know the 'private chat name' (aka: private chat folder name), for example "EASY777", then, they can join the chat anytime without having to post anything on the public chat (that folder stores the messages permanently). So basically, we can have a public chat, and a private chat and all without a database or anything special.

You can also check the chat made by DJ, here (which can give you some new fresh ideas).


Bug reports / Re: HFS Documentation (English)
« on: July 16, 2018, 02:14:06 AM »
also found a old revision
That's right. Most of the deleted Wikis are still available clicking on 'View history', then on the date of some revision (I've made another mirror of that Wiki page here, just in case). I hope Rejetto can make some time to at least fix the login error, so we can start fixing those errors, reverting those wikis to the last good revision. I've read somewhere that login error could be fixed updating the MediaWiki engine to the latest version, but I'm not sure (I've reported this bug several months ago, here).

I was referring to this:After the button is clicked, then that may be a good spot for a photo thumbnail, players, etc...

Also, I had a thought about the speed--duplicate call to %item-url% costs +25% delay and another +5% for the span tag (the sum is about a third); so, howabout no extra button whatsoever, but, instead long-click or right click the filename, and then only one call to %item-url%? I wonder if that is possible.
I've uploaded a mockup of this to give you an idea (it only works the first menu, but needs the correct code to work properly). It's based on the latest Throwback7.

To work fast and don't overload the server, %item-size% and %item-modified% should be only asked to the server "on-demand" when we click on the menu button (I've commented some unused code, and when everything is working, then we could expand the functions and add more buttons on the menu, to handle music and video files, like the original Throwback7 had).

I wish I could have an answer to help you to complete this, but sadly I don't know how to we can make a JavaScript function work correctly with a HFS Macro (like %item-added%). I was thinking using a 'onclick' action call to show a modal with a few option buttons.

And today I've found something interesting here to start testing with (I've adapted and minified the code, just to give you an idea, so you can replace the actual red 'delete' button, with this new 'plus' green button). Have a look:
Code: [Select]

.modal{display:none;position:fixed;z-index:1;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:rgba(0,0,0,.4)}.modal-content{background-color:#fefefe;margin:15% auto;padding:20px;border:1px solid #888;width:50%;text-align:center}.close{color:#aaa;float:right;font-size:28px;font-weight:700}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer}


<button id="MoreInfoBtn" style="background:transparent;border:none;color:green;">&#10010;</button>

<div id="InfoModal" class="modal">
  <div class="modal-content">
    <span class="close">&times;</span>
    <p>FileSize: %item-size%</p>
    <p>TimeStamp: %item-added%</p>
    <button value=1 class="option_button">Rename</button>
    <button value=2 class="option_button">Delete</button>
    <button value=3 class="option_button" onclick='moveClicked()'>Move</button>

var modal=document.getElementById("InfoModal"),btn=document.getElementById("MoreInfoBtn"),span=document.getElementsByClassName("close")[0];btn.onclick=function(){"block"},span.onclick=function(){"none"},window.onclick=function(n){"none")};



It's only a basic idea, still needs some work to be done to function properly.

HTML & templates / Re: Need help with file delete feature.
« on: June 01, 2018, 10:22:36 PM »
Back when the web was new, sites had a sharp clarity look. The blue&silver colors probably help too. The 90's style of HTML forces more attention to detail, like using a little paint brush instead of a big paint brush.
+1 for using <marquee><b>HFS</b></marquee>, that gives the nostalgic touch. :)

The problem:
Slowdowns are caused by a feature inside file list loop (load*files*users).
Macros and server side scripts are disaster when magnified times the number of files.

Currently, the delete feature costs 28% of the speed when done like this:
   {.if|{.get|can delete.}|<td class=rw align=center><form method='post' id='filelist'><input type='hidden' name='selection' value='%item-url%'><button type='submit' name='action' value='delete' class='del' onclick='return confirm("Delete %item-name%?")'>X</button></form></td>.}
if 40 users browsing 1000 files, the code gets 40,000 times bigger, and you get a broken server
Sometime ago, I was thinking in another approach: removing the delete button, and adding a "+" button instead, which when clicked, it opens a modal screen (in dark grey color) with three nice and big buttons, giving options like: Rename, Delete and Move (and we could even add a 'Send to' when using a mobile). This way, the 'server side' check (to verify if we could delete the file), is only processed on-demand when that "+" button is clicked. I think this could be a win-win situation to solve this, not only because we don't overload the server, but we also add more options. The hard part is coding it... :-[

HFS ~ HTTP File Server / Re: HFS Network Storage Integration
« on: June 01, 2018, 10:22:10 PM »
@Funtime60: I don't know how you add those drives on HFS, but I think you should try adding those network drives not using 'drag-and-drop'. Do this way: right click on the 'House' of 'Virtual File System', and click on 'Add folder from disk...' then click on 'Real folder'. To do this, the network drive should be already listed on 'My PC' first. If it's not listed there, follow the next steps to mount the network drive, reading a guide HERE.

If it's not working, please attach a screenshot of your HFS.

there is a serious security hole in the use of this script, this one in the state allows access to the entire hard disk hosting HFS
Thanks for reporting the security issue. I've updated the first post to warn users about this.

I am studying the case taking into account the eventuality where the source file would be also the file of destination and would be destroyed irremediably during the transfer and its size becomes zero
Do you mean: if the same destination file exist, then delete the destination file? I think it's better to automatically rename the destination file, not to delete/overwrite it. So, if destination file ("filename.zzz") exists, then save new file destination as "filename_001.zzz". If "filename_001.zzz" exists, then save as "filename_002.zzz", or "filename_003.zzz", "filename_004.zzz", and so on...

More info would be needed, like HFS version you use, operating system, CPU model, and confirm if you are using the default HFS template.

Try disabling for a few minutes any security suite (antivirus), and see if this continues (most antivirus automatically scans any incoming/outgoing files and this could hang your PC).

HFS ~ HTTP File Server / Re: Why a session is limited to 1GB?
« on: May 27, 2018, 10:50:19 PM »
It could be your ISP. It's recommended to always use a Download Manager if you are having issues  (you can see a list of Download Managers here). HFS does NOT limit the amount you could download.

See if this post helps you.

HTML & templates / [Testing] Remote upload (Macro)
« on: May 26, 2018, 10:06:25 PM »
@Mars: After doing several tests, everything seems to be working OK, but somehow, I've found a small rare bug/issue: if connection gets closed (or dropped) by the remote server (or by bad connection quality) while downloading a chunk, then the result was getting a corrupted file (I've ended up with a corrupted 15,7MB file, instead of being 12,6MB). It only happened once, and then I couldn't recreate the error. I don't know if we can get a workaround or modify the code to avoid bugs like this happen again, but I will leave you the logs of my tests:

GOOD download (normal log):
10:25:05 Requested GET /
10:25:13 loading from '' 13256704 bytes
10:25:34 chunk=10000000 from=0 size=10000000
10:26:08 chunk=3256704 from=10000000 size=3256704
10:26:09 saved file contain 13256704 bytes
10:26:09 Requested POST /

BAD download (issue log):
(Marked in bold = are the abnormal execution of code)
(Marked in red = comments added by me to describe the situation)
10:36:05 Requested GET /
10:36:17 loading from '' 13256704 bytes
10:36:53 chunk=10000000 from=0 size=10000000 > Connection dropped!
10:37:16 loading from '' 13256704 bytes
10:37:38 chunk=10000000 from=0 size=10000000
10:37:47 chunk=3256704 from=10000000 size=3256704
10:37:48 saved file contain 13256704 bytes
10:37:48 Requested POST /
10:37:48 chunk=3256704 from=10000000 size=3256704 > WTF!?
10:37:49 saved file contain 13256704 bytes > Not true, file was bigger, (exactly 16513408 bytes)!
10:37:49 Requested POST /

Code used (RemoteUpload3.tpl):
<form method='post'>
URL: <input name='url' value="">
<br>Filename: <input name='dest' value="%folder%Core-9.0.iso">
<br><input type='submit'>
{.add to log| loading from '{.^url.}' {.filesize|{.^url.}.} bytes .}
{.break|if={.not|{.filesize|{.^url.}.}.}|result=Source file can't be downloaded: server return nul size.}
{.comment| define CHUNK with the min size, if nul then WHILE is never executed.}
   {.add to log| chunk={.^chunk.} from={.^from.} size={.length|var=data.}.}
      |   {:
         {.comment| redefine CHUNK with the min size, if nul then WHILE is stoped.}
      | {:{.set|chunk|0.}:}
   |else={:{.add to log|Error during WHILE.}
{.add to log| saved file contain {.^from.} bytes.}

» Ideas for solutions/enhancements: I don't know if there is a way to 'detect' if a connection was closed (or dropped) while downloading a chunk, but I think a simple verification of file size after finish the download, could be of help. Also, perhaps a 'progress' bar could be of help, meanwhile the file is downloading (if the download on the server takes too long).

I was trying to add a 'progress' bar, like HFS has by default for uploads (useful if the download on the server takes too long), but using %progress-files%, %total% and %speed-kb% doesn't seem to have effect.

HTML & templates / Re: Update. Phone friendly.
« on: May 26, 2018, 09:15:35 PM »
@Mars: thanks for the explanation! (I've found very interesting how '[+special:alias]' work, especially on how we can combine macro code with an alias (an alias that works almost the same as a 'variable'). It surely gives endless possibilities and makes the code more easy to handle.

@Danny: I've tested the new Throwback7.tpl and this is getting better and better (that gradient background looks great). By the way, I don't see any more enhancements available without slowing down the server, so, it's done for me, at least for now.


The table can't have every col as a % because then the delete button won't appear.  On the phone, it is intentionally expanded off the right side, when the phone is held vertical; and that's because it is more important to see the filenames than to have the table stay within the bounds of the screen (especially 5cm screen).
@Danny: I agree, my mistake, sorry, I didn't have enabled the delete button when doing edits (take all this like my customized and very experimental version, you don't have to incorporate my changes to your version, which is already working great).

I choose to cut file names, because I usually have very long file names and they look like a mess on small screens. With JavaScript, I was also planning to use the tag 'title' to show the complete filename on mouse over, but on phones I guess that won't work).

To show %item-modified% as MM/DD/YYYY, change this:
%item-modified% this:


@BMartino1: I was thinking in adding a "Parent Directory" item (like another item on the file list), at the top of the file list (except on root), like Apache usually does. See how this works, on this live example:

I still have to see how to hide columns on small screen sizes (too much work for today, perhaps I'll do it on the next few days)

(I've uploaded a new revision, here. Report any bugs, if you find them)

Small enhancements:

Throwback6x.tpl - Change log:
- Font smoothing
- One line per file
- New background color

Throwback6y.tpl - Change log:
- New transparent delete button.
- Now displays only the file date
- Small tweaks on column width
Still missing:

- Hides columns if screen is small
- Use divs instead of tables? (info)
- "Parent Directory" like apache has.

(Feel free to fix/enhance it, if you find something wrong)


@Rejetto: There is no hurry for me, take all the time you need before publishing a new stable version (I also confirm that the 'remote upload' feature works perfect now on this new build). :)

@Mars: Your code posted here works fine with local files (and with small changes on the code, also with external files).

» EDIT: I'm currently doing several tests...
(I'll post the results on the next few days).

Pages: [1] 2 3 ... 30