rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: NaitLee on May 01, 2020, 02:33:44 PM

Title: The "Takeback" template - A different & modern taste
Post by: NaitLee on May 01, 2020, 02:33:44 PM
Discover its Main Page (http://takeback.tk/)!

Last update:
0.3.5.3 (https://github.com/NaitLee/Takeback-HFS-Template/releases/tag/0.3.5.3) for both HFS 2.3 and HFS 2.4 RC (https://github.com/rejetto/hfs2/releases)

With the layout of Throwback, but looks cool!

Also, supports skins to hfs-2.4- and throwback-style.

What's different is, it's feature rich, stable and can be considered as a "core".

Anyway, just try it!


Poll: Do you want a tool for creating templates easily?  (https://linkto.run/p/4ZJLF586)
Title: Re: The "Takeback" template - A different & modern taste
Post by: LeoNeeson on May 02, 2020, 01:10:55 AM
Hi, and welcome to the forum. :) A good first post! We always need template designers (as well anyone who keep this forum alive). I quickly tested it and looks good (with nice features from other templates). If you participate on other forums, keep spreading the word about HFS (so more people get part of the forum community, especially if you know some Delphi or Pascal programmer). Since you are from China, you can contribute here (http://rejetto.com/forum/index.php?topic=13134.0) with the translation to chinese, reviewing if some translation is missing or checking everything is well translated (of course, only if you have some spare time, no pressure at all, we all do this as a hobby).
Cheers,
Leo.-
Title: Re: The "Takeback" template - A different & modern taste
Post by: dj on May 02, 2020, 05:12:32 AM
welcome

+ readable script (better readable than mine ;)), starry_night, additional fileicons
-  I would try to replace jquery with native (it's not so much), to make it faster
Title: Re: The "Takeback" template - A different & modern taste
Post by: danny on May 02, 2020, 05:58:45 AM
I'm happy about this.  It has a nice big clear view!

Also have 6 development notes:

1). For the photo thumbnails feature, try to load only 5 at a time (load 5 fully, and then 5 more......).  A concurrency control is needed to prevent a crash on folders with very many photos.  Also, you'd want to see them sooner--For example a folder of photos sized 2300 million bits and 3 megabit per second connection takes 767 seconds (12-3/4 minutes).  Or, it is faster to load in small groups.

2). The timestamp could be shorter--it is too verbose for mobile screens.   For users, small date is less reading, which looks easier.
Edit:  I see that you've made it adjustable.  Perhaps just flip the default to shorter.

3). "Cyberfile http-access service established via HFS::Accomplished" needs to be shorter/simpler so users don't think it was an error message.  It is more helpful to let users know the site is a file server so they can think clearly of how to use it.  Even more simplified and probably better:  Files Available for Download

4). The "X" could be replaced with a Modal-Menu for delete, move, rename. I always wanted to do that, but I didn't manage to achieve it.

5). You could consider updating to the new login form (https://rejetto.com/forum/index.php?topic=13054.msg1065523#msg1065523) for the [unauthorized] section so it can be used in cases where basic auth is unavailable (some phones and tablets).
You might want to update the error pages--Throwback 14 doesn't use [error-page] section because [error-page] leaks.  That one portion can be deleted, yet the conditional pages still work. 

6). The connections regulator from Throwback13 can be deleted.  It is okay to make settings only once (at template load).  After that, it is best to allow the server-owner to make their own choices.  There's why #12, #13 got deleted.  Have a look at #14 to see the updated method, which is much easier for the server-owner to control. 
Title: Re: The "Takeback" template - A different & modern taste
Post by: danny on May 02, 2020, 09:53:58 AM
I tested this morning, with a rate of 0.8kbits and a very large folder to see if it would stall or stream.  It streams!  Good job!!
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on May 02, 2020, 01:51:18 PM
Thanks everyone here! I'll post an update later!

Also have 6 development notes:

Thanks for advice! I'll try them later!
Solutions to the new features may cost time to get fully discovered, please wait
And... which area does the code contain a "connections regulator"? It's hard for me to find & judge...

-  I would try to replace jquery with native (it's not so much), to make it faster

I'll try it, but may need some time to find a proper way to deal with animations. Making a CSS3+Javascript animation system may also cost time.

you can contribute here (http://rejetto.com/forum/index.php?topic=13134.0) with the translation to chinese, reviewing if some translation is missing or checking everything is well translated

It will be great to get HFS well translated. I had a look on that, but met some problem:
Title: Re: The "Takeback" template - A different & modern taste
Post by: rejetto on May 02, 2020, 04:28:46 PM
welcome to the forum!
Title: Re: The "Takeback" template - A different & modern taste
Post by: SilentPliz on May 02, 2020, 06:50:22 PM

Welcome NaitLee!

I only have my smartphone available at the moment, so I haven't used your template yet.
But reading the users reviews, I'm sure I won't be disappointed.

About false positives reported by some antivirus softwares: either they report that HFS is a server, or they are caused by compressing the executable with UPX.
Good antiviruses don't fall into the trap ... because they really scan the file, not just the headers.

About the translation of HFS.
The link that Leo gave you to 'my' release to translate ... the Chinese translation is indeed done with a machine (Google translator). I was thinking of helping translators a bit by doing this. I can provide a blank file for who would be interested.

Otherwise, the HFS release of rejetto, the one and only one :) can be translated with an hfs.lng file (it's like an .ini file).

Rename default.txt -> default.po
Title: Re: The "Takeback" template - A different & modern taste
Post by: LeoNeeson on May 02, 2020, 09:42:06 PM
:-[ Yes, sorry to not make it clear: the link I've gave you (http://rejetto.com/forum/index.php?topic=13134.0) is for the SilentPliz version of HFS (http://rejetto.com/forum/index.php?topic=10242.0) (which includes SSL). SilentPliz explained much better than me :) (I was writting this offline on my notepad, before posting it, so, I'll post this message anyway).



  • I heard there is also another way to do translations. Which one is more recommended? (or just do both?)
Basically there are two different translations you could do: one for the modified/enhanced version of HFS done by SilentPliz (that you will find here (http://rejetto.com/forum/index.php?topic=10242.0)) and the other, for the original/unmodified release of Rejetto, which you can simply translate it (it's the file hfs.lng (https://rejetto.com/forum/index.php?action=dlattach;topic=11884.0;attach=8734)) using a Unicode text editor, like Notepad++ (https://notepad-plus-plus.org/), or IniTranslator (http://rejetto.com/forum/index.php?topic=11898.msg1064632#msg1064632) (or any other you use).

  • I want to know is there anyone else doing this :D.
I can confirm nobody is doing a translation to the chinese of the original HFS. You choose which one you want to translate (or you could translate both, if you have some free time). Both translations are equally useful.



» Small detail: You could include the 'Monda.ttf' file inside the template (if you wish), encoding the file on Base64, with something like this:

Code: [Select]
[fonts.css|no log]
@font-face { font-family: 'Monda';
src: url('data:application/x-font-ttf;base64,xxxxxINSERT-BASE64-HERExxxxx') format('truetype');
}

Then you load it using:
Code: [Select]
<style type="text/css">
{.$fonts.css.}
</style>

Cheers,
Leo.-
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on May 03, 2020, 06:38:17 AM
Yeah, nice! I completed the translation of hfs.lng.  ;) And surprisingly, it can be used at both of the versions!  ;D

Title: Re: The "Takeback" template - A different & modern taste
Post by: SilentPliz on May 03, 2020, 07:17:50 AM

Hi! 😉

Good game !  8)
It's nice to have a Chinese translation.

It's normal that many strings are not yet translatable in the release of rejetto ... it's still 'works in progress', but it will evolve.

My release can't be (and will not be) translated entirely with the hfs.lng files ... It works, but I chose an another localization system: DxGettext.
With the .po and .mo files, my releases can be fully translated (I've been working on it for localization more longer).

The next step? :)
You can post, if you want, on the Chinese board, your file ... you will make users happy there ... and will eventually be able to find collaboration for the translation.

Thank you for your work for HFS and its users.
;)

The Chinese board:

http://rejetto.com/forum/index.php?board=42.0 (http://rejetto.com/forum/index.php?board=42.0)
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on May 03, 2020, 08:18:13 AM

The next step? :)
You can post, if you want, on the Chinese board, your file ... you will make users happy there ... and will eventually be able to find collaboration for the translation.


OK, I'll do it. :D
But I see the last reply in Chinese Board is in August, 2019... It seems not much popular...
Though it's hard in China to have an account here due to the recaptcha...

But I see there are guests viewing that board, maybe they need it now.  :D

Edit: I have done that just now ;)
Title: Re: The "Takeback" template - A different & modern taste
Post by: SilentPliz on May 03, 2020, 08:54:41 AM
They (people) were waiting for you.  :D

Quote
Though it's hard in China to have an account here due to the recaptcha...

Maybe rejetto can check and correct this (?)
   
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on May 03, 2020, 09:14:39 AM

Maybe rejetto can check and correct this (?)


But if recaptcha is removed/replaced, this forum(as well as others if they do so) will face a security problem...
So we should leave that here...

4). The "X" could be replaced with a Modal-Menu for delete, move, rename. I always wanted to do that, but I didn't manage to achieve it.

(Maybe) I found how to do that! I'm still trying!

» Small detail: You could include the 'Monda.ttf' file inside the template (if you wish), encoding the file on Base64, with something like this:

Code: [Select]
[fonts.css|no log]
@font-face { font-family: 'Monda';
src: url('data:application/x-font-ttf;base64,xxxxxINSERT-BASE64-HERExxxxx') format('truetype');
}

Then you load it using:
Code: [Select]
<style type="text/css">
{.$fonts.css.}
</style>

Comparing to this template, the file (and that base64 one) is still too big to be inserted... as well as my editor, is lagging...
A late-late edit: Still accepted this idea!
Title: Re: The "Takeback" template - A different & modern taste
Post by: SilentPliz on May 03, 2020, 09:36:29 AM
Quote
But if recaptcha is removed/replaced, this forum(as well as others if they do so) will face a security problem...So we should leave that here...

Removed no, but maybe make them more understandable (accessible) to Chinese users.

Title: Re: The "Takeback" template - A different & modern taste
Post by: danny on May 03, 2020, 11:11:17 AM
. . . Thanks for advice! I'll try them later!. . .
Was some of my notes, although you did much better on the GUI and preview. 

I'm just so very impressed to see a modernization that can:
Stream the file list in any conditions for any connection speed.
List any size folder.
Do photo-thumbnails ondemand.

I wish it did not load extra font nor extra jquery. 

But, mainly, I'm really impressed: 
Rather than reliance on ideal conditions,your Takeback template always works. 
Most modernized things can't do that.

I can hardly wait to see what the next update will bring.
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on May 04, 2020, 07:01:27 AM
I wish it did not load extra font nor extra jquery. 
...
I can hardly wait to see what the next update will bring.

Yes, here you are! See the first post to check it out!
Choose whether to use font and jQuery or not on your own! Fallbacks for them are also perfect enough.

... and, the FaikQuery is not jQuery:
Code: [Select]
// FaikQuery: WIP
function _$(querier) {
var elements = document.querySelectorAll(querier);
this.hide = this.fadeOut = this.slideUp = function () {
    elements.forEach(function(element, index) {
        element.style.display = 'none';
    });
}
this.show = this.fadeIn = this.slideDown = function () {
    elements.forEach(function(element, index) {
        element.style.display = 'block';
    });
}
}
function $(element) { return new _$(element); }
It's easy & short, enjoy!
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on May 05, 2020, 08:44:19 PM
5). You could consider updating to the new login form (https://rejetto.com/forum/index.php?topic=13054.msg1065523#msg1065523) for the [unauthorized] section so it can be used in cases where basic auth is unavailable (some phones and tablets).

Just have done that perfectly. A new update is uploaded. See the first post.

And... I tried many times to make animations in FaikQuery, but always fails. I only need something can do live show/hide animations to an element. Is there anything can do (just) this? Better with CSS3, or anyone please help me about that...

My holiday seems going to be end... Updates may not be as frequent as now...
Title: Re: The "Takeback" template - A different & modern taste
Post by: dj on May 06, 2020, 09:05:42 AM
a little mistake in 0.12c:
Code: [Select]
<!-- Jquery is included in this HFS link -->
<script src="/js/jquery1.11.js"></script>

I only need something can do live show/hide animations to an element.
you can't animate display, but you can animate height
for fadeIn this (http://youmightnotneedjquery.com/#fade_in) can help
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on May 06, 2020, 01:06:09 PM
a little mistake in 0.12c:
Code: [Select]
<!-- Jquery is included in this HFS link -->
<script src="/js/jquery1.11.js"></script>
you can't animate display, but you can animate height
for fadeIn this (http://youmightnotneedjquery.com/#fade_in) can help

Ahh, really sorry for that, but I'm doing my work really late at that "day" (4am, you may noticed that),
at that time I'm finding why my jQuery stopped working, replaced it as my local one, then ignored this problem...

I didn't even sleep yesterday, forgive my fault...

And thank you for this link :D, no tiring mimic to jQuery anymore!
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on May 06, 2020, 03:33:12 PM
you can't animate display, but you can animate height
for fadeIn this (http://youmightnotneedjquery.com/#fade_in) can help

I have successfully done the work! No jQuery anymore! See the new version!
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on May 08, 2020, 02:00:36 PM
Life comes busier and busier, and I may not here for at least half one month... As the last post before I go, I'd publish some of my plans and questions:

Going to do:

Questions:

Just leave message anywhere, including mails. I'm sure I'll check them, but working hard with template seems impossible these days...

Loves,
NaitLee
Title: Re: The "Takeback" template - A different & modern taste
Post by: LeoNeeson on May 09, 2020, 07:18:47 AM
Going to do:
  • Code structure sort. I want it be better for everyone to read, learn, and take away any function they want to their own template/webpage.
Your to-do list is very good! :) About this last point (about giving the code a modular structure), I have one idea: make a configuration or preferences page, where users can enable or disable functions (with a checklist for each option, and where settings are saved on a cookie). For example, if some user want to disable file previewing or any other option, it could do it without touching the code. Well, it's only an idea. :D

  • There are several ways for reducing data cost: Put scripts/css in file sections (as [auth.js|no log] rather than [sym-auth]), or make them as files, for caching and used by other ones. Which one should I use?
File sections are better, since they reduces unnecessary loading of parts that can be cached, thus making it faster.

  • Do I need make several skins for this template?
If you add a settings panel, you could add the option to customize the style of your template (doing conditional loading of CSS files). Making several files only to change the skin, would lead to more confusion, since some users would download a template and not test another. But if you include all the skins on the same template, it would make things easier for the users (one template, one download, with several skins inside). Well, at least is my point of view, you have the final decision.

  • Is this template compatible to HFS 2.4? I simply checked a few features on 2.4 rc4, and seems file controlling is not as stable...
Rejetto has recently labeled his 2.4 builds as 'alpha' on GitHub. Alpha software means that is still in the early testing phase. I don't know if he is following this (https://en.wikipedia.org/wiki/Software_release_life_cycle) software release life cycle or not, but alpha (https://techterms.com/definition/alpha_software) usually means a software could contain errors and is not mature enough (not thoroughly tested) as a stable release (like v2.3m). But I'm sure it will get better then the transition to Delphi 10 is completed.

Though it's hard in China to have an account here due to the recaptcha...
What kind of captcha is most used in China?. Could you make a list of the most popular captchas available there, that work fine in China? Perhaps (if Rejetto is interested), he could then modify the forum for use Google's reCaptcha for all the world (except China), and use another captcha for China users (detecting the country by the IP of the user). That way, he doesn't disable the captcha security, but use another captcha for China. Doing this, the chinese forum section could have more life/activity, and it could speed up the developing and testing of the Unicode thing.

  • So what is the next step? :P
About your translation of HFS to chinese. I forgot to say that (if you have some spare time) you could also translate the default template, by simply translating the following words to chinese (you have to write the chinese translation after the "=" simbol):

Code: [Select]
[+special:strings]
HFS=HFS
Uptime=
Login=
Search=
Enable multi-selection=
Selection=
New folder=
Display timestamps=
Toggle timestamp=
Archive=
Upload=
User=
Anonymous=
Change password=
Mask=
Invert=
Delete=
Move=
Go=
Download counter:=
NEW=
Not found=
Server Too Busy=
Download limit=
Unauthorized=
Forbidden=
Time left=
Uploading=
Downloading=
Ok=
Error=
No access=
Bytes=
Password changed, you'll have to login again.=
Sorry, you lack permissions for this action=
Download these files as a single archive?=
selected=
title=HTTP File Server
folders=
files=
File=
Folder=
this folder and sub-folders=
this folder only=
entire server=
item folder=
go to root=
The server is too busy to handle your request at this time. Retry later=
max s dl msg=
Either your user name and password do not match, or you are not permitted to access this resource.=
This resource is not accessible.=
You are banned=
No file exchange in progress.=
Moving items to=
already exists=
not moved=
confirm=
Enter the destination folder=
We met the following problems:=
files were moved.=
No file was moved.=
Please enter the file mask to select=
Sort by=
Name=
Extension=
Size=
Timestamp=
Hits=
Default=
Rename=
Comment=
Sort=
uploaded by=
Uploaded=
Failed=
Queued=
created folder=
renamed=
no files=
no results=
Reload page=
More options=
Speed=
to=

Some strings may look repeated, but since they are case-sensitive, they must be written that way. You can see an example here (http://rejetto.com/forum/index.php?topic=11880.msg1064490#msg1064490) (it's my translation to spanish). If you have any doubts, for example, for "max s dl msg" you have to translate this text "There is a limit on the number of <b>simultaneous</b> downloads on this server.<br>". You will find this (along with other examples) on the default v2.3's template, on the [+special:strings] section. That would complete 100% your translation.

Cheers,
Leo.-
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on May 09, 2020, 02:09:34 PM
I just got a good new that I can still be here for 2 days, then back here to have a look... Really thanks Leo ;)

If you add a settings panel, you could add the option to customize the style of your template (doing conditional loading of CSS files).
...
What kind of captcha is most used in China?.
...
I forgot to say that (if you have some spare time) you could also translate the default template,
...

I would like to insert a thing to my to-do list: Ajax file searching. This will break the encode problem currently HFS have, but unable to show date & size of the search results(files).

For a settings panel, this is a great idea. Since I have done several VB6.0 applications before I know HFS, I can make such a thing outside the template easily, and it will be useful for both people here and my friends, as well as my another project...

For the captcha here, the mostly used one is dragging-a-puzzle. This is rather easier than Google's one. And there are also other ways,
more can be found at Netease YiDun (https://dun.163.com/locale/en), this is a captha service from China, with global ranged.
It also comes with a free trial, and seems needs money... More for it can tap on Contact Us in its page and chat directly to the service.

The strings in default template is rather few, too. I'll consider that  :)
Title: Re: The "Takeback" template - A different & modern taste
Post by: SilentPliz on May 09, 2020, 08:11:56 PM
NaitLee

I've sticked your topic, and also that of the Chinese board. :)
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on May 10, 2020, 06:54:02 AM
About your translation of HFS to chinese. I forgot to say that (if you have some spare time) you could also translate the default template

I have just done that, and modified (added) that in my post in Chinese Board ;)

NaitLee

I've sticked your topic, and also that of the Chinese board. :)


Ah, thank you! :D
Title: Re: The "Takeback" template - A different & modern taste
Post by: danny on May 12, 2020, 01:09:05 PM
...Which license should I use for this template? Better a free (as in freedom) one without too many limitations. Mostly the result is based on @danny 's throwback template, because my template is based on this...
It is partially DJ's code which has BSD 2-Clause open source license.  That is compatible.  It is de-facto BSD 2-clause open source.
Title: Re: The "Takeback" template - A different & modern taste
Post by: danny on May 17, 2020, 08:01:42 PM
When I used Takeback_Beta_0.13b, I thought that the speed is impressive. 
It is faster than Throwback13.  So, clearly, the speed is good. 
I like it! 

But, I was wondering, howabout changing the X for a model with delete, move, rename? 
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on May 23, 2020, 10:07:46 AM
I'm back! :D For one day! :D

But, I was wondering, howabout changing the X for a model with delete, move, rename?

I think I have done file action models days ago:
 Once you have permissions to these actions in your folder, you can see orange colored text menu below the "X", above the preview.
 Besides, "X" is not removed since we need hide preview frame sometimes.
Have fun! ;)
Title: Re: The "Takeback" template - A different & modern taste
Post by: rejetto on June 10, 2020, 11:36:19 AM
I just noticed that this template is making a lot of settings at install-time, many unnecessary and possibly unwanted by the user, and even more important it seems the user is not warned about them, while he is probably not expecting them.
I'm reporting the list here just as a reference to the reader
Code: [Select]
{.set ini|use-system-icons=no.}
{.set ini|log-progress=no.}
{.set ini|log-dump-request=no.}
{.set ini|log-only-served=yes.}
{.set ini|tray-icon-for-each-download=no.}
{.set ini|enable-fingerprints=no.}
{.set ini|send-hfs-identifier=no.}
{.set ini|support-descript.ion=no.}
{.set ini|load-single-comment-files=no.}
{.set ini|hints4newcomers=no.}
{.set ini|save-totals=no.}
{.set ini|tray-shows=ips.}
{.set ini|flash-on= .}
{.set ini|browse-localhost=no.}
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on June 10, 2020, 12:31:57 PM
I just noticed that this template is making a lot of settings at install-time, many unnecessary and possibly unwanted by the user, and even more important it seems the user is not warned about them, while he is probably not expecting them.

These settings are also present in Throwback14. They are just inherited.

How about let HFS remember what settings did a template make, and after switching to another template HFS just restore them?
Title: Re: The "Takeback" template - A different & modern taste
Post by: rejetto on June 10, 2020, 01:01:56 PM
These settings are also present in Throwback14. They are just inherited.

i know, but you can decide if you want to remove some of them.
Anyway, it's your template and i'm not telling you what to do, it's only a suggestion.

Quote
How about let HFS remember what settings did a template make, and after switching to another template HFS just restore them?

the installation can make any kind of action not just settings, tracking all of them would be not easy, and some actions would also not be undoable (what if you delete a file).
and if the user makes further changes on its own, the uninstall would end ruining what the user did.
i don't think we'll never see such feature, but surely we don't have it now.
Title: Re: The "Takeback" template - A different & modern taste
Post by: danny on June 11, 2020, 11:28:06 AM
The old settings were to decrease server workload.  However, they need reviewed/tested to see if they are good with HFS2.4. 

If you have image thumbnails, it may be good to add:  {.set item|/|not as download=*.png;*.jpg;*.JPG;*.jpeg;*.gif.} because the thumbnails work faster without logging per each. 

With 2.4 there is a new thing.  Connections and Speed limits make too much work for the server.  So, if there are thumbnails, it is necessary to modify the javascript lazyload so that thumbnails load few/one at a time.  I did a low-hanging-fruit mod for Throwback/2.4 for 509ms between retries; but, perhaps you would have a better idea to support the series-order nature of a single thread server? 
Title: Re: The "Takeback" template - A different & modern taste
Post by: danny on June 24, 2020, 03:40:45 PM
...Last update: 6/17 9pm: 0.15c on GitHub (https://github.com/NaitLee/Takeback-HFS-Template/releases/tag/0.15c) Supports 2.4 RC5...
I tested throwback and Takeback together to see if they have large folder support (despite rough connection). 
For this test I set speed limit of 0.1 and then searched from root for *.*

It took a while.  And, they are successful. 

It was a simulated/artificial test for finding out if more was needed for large folder support.  More recconiter wasn't needed.  Throwback and Takeback delivered really well.  There was nothing else in scope of the test.  That doesn't test everything.  But, the good news is that if you wanted a list of files, it works for any speed of internet connection.
Title: Re: The "Takeback" template - A different & modern taste
Post by: rejetto on June 27, 2020, 09:16:34 AM
The old settings were to decrease server workload.  However, they need reviewed/tested to see if they are good with HFS2.4. 

You can decide to let the user if to apply these "extra optimizations".
I updated the documentation for {.dialog.} with an example on how to do that.
https://rejetto.com/wiki/index.php?title=HFS:_scripting_commands#Others

Quote
With 2.4 there is a new thing.  Connections and Speed limits make too much work for the server.  So, if there are thumbnails, it is necessary to modify the javascript lazyload so that thumbnails load few/one at a time. 

2.4 doesn't affect file downloading, and not even ~sections downloading. I don't understand why you put so much '509' code for all of them.

I tested throwback and Takeback together to see if they have large folder support (despite rough connection).  For this test I set speed limit of 0.1 and then searched from root for *.*

if you are interested you may consider using the speed limiter included in Chrome: F12, network, click on the 'online' drop down menu' above.
Title: Re: The "Takeback" template - A different & modern taste
Post by: danny on June 27, 2020, 12:43:21 PM
... I don't understand why you put so much '509' code for all of them....
NaitLee: "I used a setInterval() in Takeback to load a few images (append an img element) at a time." 
But, I didn't figure that out, so new Throwback does the tiny delays a little differently. 
The purpose is same:
Single thread server with Multiple users. 

If a nonstop stream of images to one user, other users can't get file list, server owner can't use UI. 
However,
If we put in tiny delays between images, other users get the file list and server UI stays alive. 
Also useful for less # requests per second. 

P.S.
After that, NaitLee updated Takeback to a live preview, which is 1 photo a time and works really well on home connections. 
So, the problem does not relate (does not happen) to the current version of Takeback.
Title: Re: The "Takeback" template - A different & modern taste
Post by: rejetto on June 28, 2020, 08:51:50 AM
If a nonstop stream of images to one user, other users can't get file list, server owner can't use UI. 

but only file list is limited, images are not, you should not get errors on images.
I browsed a folder with 1200 photos with your tpl, enabled thumbnails, and got no errors, all loaded at first attempt.
I repeated the test while a script was bombing with tens of requests per second on the same address (127.0.0.1), no errors and the photos continued to be downloaded and watched.
Title: Re: The "Takeback" template - A different & modern taste
Post by: danny on June 28, 2020, 11:24:22 AM
The poll is good. 

Instead of connections limit, you can use sensor:  {.if|{.%number-addresses-downloading%*%speed-out% < 7500.}|{:{.if|{.%connections% < 40.}|{: okay for extra features, else diet/conservative-mode.
Title: Re: The "Takeback" template - A different & modern taste
Post by: turtz0 on October 20, 2020, 08:12:56 PM
0.2.1 zip is corrupt on github for me. + I found a bug on 0.2.0, I can't turn off status message. Not sure if its fixed in latest.
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on October 21, 2020, 09:15:25 AM
0.2.1 zip is corrupt on github for me. + I found a bug on 0.2.0, I can't turn off status message. Not sure if its fixed in latest.

Wow, it's embarrassing :D...
I'll re-upload the release later, and correct the bug :)

Edit: The release should be fine now!
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on October 26, 2020, 03:18:10 PM
A diff tpl that adds 3D effect to Takeback filelist (0.2.1). It can be cool with a high resolution touch screen on a party. :) See attach
It's beta. Sometimes filenames are visually disappeared if there are too many (only happens in chrome-based browsers, not affect firefox, reduce rotateX to 4.19deg helps).
Title: Re: The "Takeback" template - A different & modern taste
Post by: mandoz on October 26, 2020, 06:04:27 PM
hi naitlee, if i can just one question.
what a diff template is and how it works

tks
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on October 27, 2020, 03:59:12 AM
what a diff template is and how it works

You can open both original template and diff template with text editors like Notepad, and edit them to fit your needs.

One way to use diff tpl is to append its contents to original template.
Another way is to put diff tpl to HFS root properties, a Diff Template tab is there, and paste diff tpls in the input box.

A diff template may general to most templates (like dj's ones) or for only specified template (like that one above).
So you may delete the diff tpl content in properties menu if you switch to another template.
Title: Re: The "Takeback" template - A different & modern taste
Post by: dj on October 27, 2020, 04:51:23 PM
A diff tpl that adds 3D effect

Added some tags, so that the Star Wars theme works with more templates.
Title: Re: The "Takeback" template - A different & modern taste
Post by: mandoz on October 28, 2020, 09:38:11 PM
hi boys, tks
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on December 15, 2020, 01:43:51 PM
Want Fuh-2.0-Liked grid filelist in Takeback? Use the diff tpl in attachment :D
Title: Re: The "Takeback" template - A different & modern taste
Post by: dj on February 06, 2021, 07:09:25 AM
What should I do now?

Learn Nodejs and do further work on HFS3 (http://rejetto.com/forum/index.php?topic=10570.0) :D
Title: Re: The "Takeback" template - A different & modern taste
Post by: danny on February 08, 2021, 11:07:33 PM
Yes, HFS3,
Or, refit a master-scheduler to HFS2x so that it can't get overloaded/flooded by 1 thing.  Currently, I think that the only schedule is in downloads; but, upload, draw UI, archive, etc are unscheduled/conflict.  Would be better if all functions were inside a scheduler (task-swapper) module so that all get near-equal cpu time.
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on February 09, 2021, 09:13:01 AM
Learn Nodejs and do further work on HFS3 (http://rejetto.com/forum/index.php?topic=10570.0) :D

Ah, for some reasons I don't want to learn Node.
And by the way, I'm not really a tech-master, cannot do large projects with multiple files relied to each other, at least for now.
Sorry for that.

Besides, I just trying to make a template interpreter for a minimal "HFS" in Python, cross platform and lightweight for template making & debugging.
It's been a long time since last trial and I've messed up... Now trying to re-write...

P.S. I worry about that if anything unfortunate happened then we cannot use our beloved HFS 2, so I had such an idea. I'm not wondering to replace it. Don't think too much :)
P.S.2. I want to get away from the hand of Windows, should I write my Linux experience on this forum/elsewhere like GitHub Pages to help other guys who want so?

Would be better if all functions were inside a scheduler (task-swapper) module so that all get near-equal cpu time.

@Rapid has a version of HFS 2 that splitted server and client code. Have a try on that?
Title: Re: The "Takeback" template - A different & modern taste
Post by: Rapid on February 09, 2021, 11:22:09 AM
...
@Rapid has a version of HFS 2 that splitted server and client code. Have a try on that?
I'm just trying to split.
One of the problems is that macroses are rely on client side
Title: Re: The "Takeback" template - A different & modern taste
Post by: Mars on February 09, 2021, 01:13:24 PM
in theory any language can be used to create a template interpreter, you need to create a syntax parser for two types of macros: {. .} and {::}, in an execution tree pointing to a reference table with the different macro names and the procedures for the associated actions

most of the hfs macros are processed in scriptLib.pas and the parser in parserLib.pas

an hfs interpreter written in java would allow portability on several platforms,

using php would surely be possible but it would certainly have limits because it is already an interpreted language
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on April 11, 2021, 12:28:05 PM
Takeback 0.3 is done :) see first post

Features:

Basic things
File Preview, comment
Music player, lyric support (.lrc)
Login, Logout, Change password
File/Folder Manipulation
anti-file-corrupt
thumbs, slideshow
Generator
Localize
Title: Re: The "Takeback" template - A different & modern taste
Post by: danny on April 11, 2021, 11:15:37 PM
compact lazyload script
Code: [Select]
<script>document.addEventListener("DOMContentLoaded",function(){var e,t;"IntersectionObserver"in window?(e=document.querySelectorAll(".lazy"),t=new IntersectionObserver(function(e,n){e.forEach(function(n){n.isIntersecting&&setTimeout(()=>{var e=n.target;e.src=e.dataset.src,e.classList.remove("lazy"),t.unobserve(e)},181)})}),e.forEach(function(e){t.observe(e)})):alert("Your browser needs an update")});</script>has 181ms delay in-between photos so that the server has some time to perform other tasks or serve multiple users 

The new version of Takeback seems to spend more time with macros; maybe there are some tasks that can be done with javascript (many client CPUs) instead of macro (one server CPU)? 
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on April 13, 2021, 07:07:46 AM
compact lazyload script...

In takeback 0.2 I used your script, it works well
In new version I used native lazyload (https://caniuse.com/loading-lazy-attr) because I want to keep it simple
Title: Re: The "Takeback" template - A different & modern taste
Post by: vladimirov70 on May 30, 2021, 02:56:32 PM
Exellent template! Thank you.
Title: Re: The "Takeback" template - A different & modern taste
Post by: 9M127 on August 25, 2021, 12:28:42 PM
Hey man. I really enjoy your amazing template! And THX for your translating here, that's nice!~
As a Chinese user, I can see there a tiny mistake in your translation. It's in the "Properties" > "flags" menu, the check button "No downloads" is translated as "不记录下载". In English “不记录下载” means "Don't log downloads". I was confused by it for a time, until I tried to have the flag "不记录下载"  of one of my folders checked, and the files under that folder is could not be downloaded anymore. So, honestly I believe its a wrong translation for "No downloads". A correct translation for this flag is “不允许下载”. So i hope you can correct that.
I also have a suggestion that you can make a tiny change to your template to improve your template. Yesterday, when I was trying to select a background image in your template-generator, I noticed the background-size of background-image is set to some fixed sizes rather than "cover". Fixed sizes are good for repeated pictures which users want to show as background, but mostly, users want their pictures extend and cover to the entire page. So I think it's a good idea to set up a selection for it in your template-generator.
I'm not a web development or scripting professional, even my college major is not much related to computer science. So above could be rash advices, go with your gut young man!
Appreciate your passion for computer science, thanks for your contribution here again! ;)
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on August 25, 2021, 01:46:20 PM
Hey man. I really enjoy your amazing template! And THX for your translating here, that's nice!~

Oh thank you!

For the "fixed size" problem, it's when I "inheriting" the star field css and forgot to delete them, also forgot to test.

I'll fix them :)
Title: Re: The "Takeback" template - A different & modern taste
Post by: 9M127 on August 28, 2021, 02:17:04 PM
Hi there, guy!
I found another bug these days. When you click "Archive" after selecting a folder, or Multi-Selecting 2 or more folders, it won't work as we expected. The browser would show an error of Empty Response. I notice there's a same bug in the default template of HFS 2.4. I'm using Edge browser based on chromium.
Title: Re: The "Takeback" template - A different & modern taste
Post by: LeoNeeson on August 29, 2021, 04:32:06 AM
Hi there, guy!
I notice there's a same bug in the default template of HFS 2.4.
Does it work fine using HFS v2.3m? (assuming you are using the latest HFS v2.4.0 RC7). My question is important to know if there was some "regression" on the latest version (if you have time, please test old builds, one by one, like RC6, RC5, RC4, RC3, etc until finding the last working version). Always make a backup of your *.ini, *.vfs and *.tpl files before doing any test.
Title: Re: The "Takeback" template - A different & modern taste
Post by: 9M127 on August 29, 2021, 06:55:11 AM
Does it work fine using HFS v2.3m? (assuming you are using the latest HFS v2.4.0 RC7). My question is important to know if there was some "regression" on the latest version (if you have time, please test old builds, one by one, like RC6, RC5, RC4, RC3, etc until finding the last working version). Always make a backup of your *.ini, *.vfs and *.tpl files before doing any test.

The Template file takeback.standard.tpl doesn't work on HFS 2.4 RC1 or earlier versions. So I tested from 2.4 RC2 to 2.4 RC7. The results show that the "Takeback" template works well until RC4. This problem only occurs in versions RC4 and above. What's more, in RC7 (the latest version currently), this problem occurs even when I'm using the default template, and this time you will get a page of javascript from the server.
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on August 29, 2021, 03:28:46 PM
The results show that the "Takeback" template works well until RC4. This problem only occurs in versions RC4 and above. What's more, in RC7 (the latest version currently), this problem occurs even when I'm using the default template, and this time you will get a page of javascript from the server.

My test conclusion:

- The default template of RC7 is doing the wrong thing: post selection data to a javascript data section, so the server did nothing other than sending javascript.
  - Please wait for rejetto to fix this :)

- My template have a bug, the helper.getFilename() function returns an empty string for folder names (which ends with a slash /, not considered ::)), and after that sends an empty selection to server, then server think it should do nothing
  - This will be my another job ;)

Thank you for doing a lot of work testing 🎉
Title: Re: The "Takeback" template - A different & modern taste
Post by: 9M127 on September 06, 2021, 12:33:04 PM
My test conclusion:

- The default template of RC7 is doing the wrong thing: post selection data to a javascript data section, so the server did nothing other than sending javascript.
  - Please wait for rejetto to fix this :)

- My template have a bug, the helper.getFilename() function returns an empty string for folder names (which ends with a slash /, not considered ::)), and after that sends an empty selection to server, then server think it should do nothing
  - This will be my another job ;)

Thank you for doing a lot of work testing 🎉

Hi! More problems was found in HFS 2.4 recently. Since HFS 2.4 RC2, There's a problem that the function "Archive" rarely works as expected.
No matter what template I was using, after clicking "Archive", I will usually get either a broken compressed file, or a weird compressed file.
For example, yesterday when I was trying to archive a folder with two "*.xlsx" files (created by Microsoft Excel), the server did gave me a "*.tar" file.
But after I extracting it, I got some strange files and folders, as if I was trying to unzipping a "*.docx" file or a "*.xlsx" file!

So I rolled back to HFS 2.3m, and now everything looks fine again.
Except, when you click "Archive", you will get a "*.tar" file containing only files shown in the list, but not folders.
Title: Re: The "Takeback" template - A different & modern taste
Post by: 9M127 on September 06, 2021, 12:42:51 PM
Hi! More problems was found in HFS 2.4 recently. Since HFS 2.4 RC2, There's a problem that the function "Archive" rarely works as expected.
No matter what template I was using, after clicking "Archive", I will usually get either a broken compressed file, or a weird compressed file.
For example, yesterday when I was trying to archive a folder with two "*.xlsx" files (created by Microsoft Excel), the server did gave me a "*.tar" file.
But after I extracting it, I got some strange files and folders, as if I was trying to unzipping a "*.docx" file or a "*.xlsx" file!

So I rolled back to HFS 2.3m, and now everything looks fine again.
Except, when you click "Archive", you will get a "*.tar" file containing only files shown in the list, but not folders.
By the way, I'm hoping for a progress bar in the upload page of your template!
Looking forward to the next version of HFS.
Love you guys! :-*
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on November 10, 2021, 11:09:28 AM
I have a small problem with this
I share albums and if i try to download a single track from an album it then downloads the whole album
Love the layout though
Any help would be appreciated
Thank You

Glad to hear feedback :)

Please give more info of that problem, such as:
- What action did you do for downloading? Maybe it's the cyan "Download", the "Archive" at page bottom, or the brown "Archive" after several selection...
- What is the form of an album and tracks? Are they appear as files inside a folder, or just one file, or a .m3u(8) file?
- ...

Good luck :D

Except, when you click "Archive", you will get a "*.tar" file containing only files shown in the list, but not folders.

It's about the "?recursive" parameter in the url ("urlvar"). When it is there, the sub-folders will be included, and will not otherwise.

In the case of Takeback (and also Throwback), this parameter is not included in the "Archive" at page bottom.
Rather, in Takeback, it's included in "Archive" action when doing multiple selection of files/folders. So, if you select all items and do "Archive" in the preview pad, the archive will be full :)

Yes, it's not easy to discover. May choose an alternative method in future.
Title: Re: The "Takeback" template - A different & modern taste
Post by: NaitLee on November 10, 2021, 12:43:18 PM
I sent you a PM with more details :)

Now it's obvious... :D So I should explain the two "Archive"s again

"Archive" is not "Download". While they both give users files, archive means to bundle all/selected files together, while download usually means only one file.

Also, have a look again at my previous message, especially the explanation after the 2nd quote.
Now you know there's 2 different "Archive"s, and the second one is which you need. It appears after selecting items, on the preview panel, as underlined brown text.

So you shall modify the note for users, say that they need to "download" selections with "Archive" on the preview panel ;)
... Or for a better approach, put this in HTML/CSS:
Code: [Select]
<style>
#preview > div:nth-child(3) > a:nth-child(5) > span:nth-child(1) { color: cyan; }
.part2 > p:nth-child(1) { display: none; }
</style>
These CSS highlights the correct "Archive" and removes the incorrect one.
( be sure to modify anything to fit exact needs )
Title: Re: The "Takeback" template - A different & modern taste
Post by: cib000 on December 26, 2021, 06:26:49 PM
 :-[
I need help.
I like the template very much.
i want this What should I do?
I need help.
I am a beginner.

Title: Re: The "Takeback" template - A different & modern taste
Post by: tombones on July 04, 2022, 11:05:16 AM
Takeback is the best thing I tried, it is great. Just one thing I would like to have: drag&drop files upload. Can you please add it?
Title: Re: The "Takeback" template - A different & modern taste
Post by: stibuz95 on September 17, 2022, 09:17:43 AM
Hello, i use this template from a lot of time and... very good job!
Now i'm trying to use a different homepage, because ive also an emby server running and i want to redirect from my homepage to emby or hfs.
Now ive managed to do it with quickPHP, but it wastes resource (few) and doesnt permit me to have good redirectings (all is fine from outside the network, but not in local).
Anyway, i've tried to change the name of the home page (the one blank), but some redirects dont work obviously. I've tried to understand where to change hrefs but i'ts a pain, im not very expert with HTML and scripts.
Is there a way to change the homepage label from [] to something like [hfs] ?
Thank you all in advance for any tips :D

EDIT:
I've tried by replacing all "href="*/" with "href="*/tildehfshome" (where tilde is the symbol and * is to say "both . and .. and nothing" but this will break some template functions (for example when im logged i cant see my files but only a string which says "%files%".
Any help? Thanks!

EDIT2: i've found that %files% only shows in the main section