rejetto forum

The "Takeback" template - A different & modern taste

NaitLee · 68 · 66310

Poll

Do you want a tool for creating templates easily?

Yes, I know nothing about coding, but I can do Windows Paint
4 (26.7%)
Yes, I can do HTML/CSS, but not javascript nor macro
5 (33.3%)
Yes, I can do Web basics, but not HFS macro
5 (33.3%)
No, I'm a full-code developer
1 (6.7%)

Total Members Voted: 15

0 Members and 1 Guest are viewing this topic.

Offline NaitLee

  • Tireless poster
  • ****
    • Posts: 203
  • Computer-brain boy
    • View Profile
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?
"Computation is not forbidden magic."
Takeback Template | PHFS


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13521
    • View Profile
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.


Offline danny

  • Tireless poster
  • ****
    • Posts: 281
    • View Profile
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? 
« Last Edit: June 19, 2020, 06:18:38 AM by danny »


Offline danny

  • Tireless poster
  • ****
    • Posts: 281
    • View Profile
...Last update: 6/17 9pm: 0.15c on GitHub 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.
« Last Edit: June 26, 2020, 03:42:33 PM by danny »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13521
    • View Profile
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.
« Last Edit: June 27, 2020, 09:20:17 AM by rejetto »


Offline danny

  • Tireless poster
  • ****
    • Posts: 281
    • View Profile
... 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.
« Last Edit: June 27, 2020, 12:57:07 PM by danny »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13521
    • View Profile
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.


Offline danny

  • Tireless poster
  • ****
    • Posts: 281
    • View Profile
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.
« Last Edit: July 19, 2020, 06:49:24 AM by danny »


Offline turtz0

  • Occasional poster
  • *
    • Posts: 2
    • View Profile
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.


Offline NaitLee

  • Tireless poster
  • ****
    • Posts: 203
  • Computer-brain boy
    • View Profile
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!
« Last Edit: October 21, 2020, 09:31:14 AM by NaitLee »
"Computation is not forbidden magic."
Takeback Template | PHFS


Offline NaitLee

  • Tireless poster
  • ****
    • Posts: 203
  • Computer-brain boy
    • View Profile
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).
« Last Edit: October 28, 2020, 03:46:36 AM by NaitLee »
"Computation is not forbidden magic."
Takeback Template | PHFS


Offline mandoz

  • Occasional poster
  • *
    • Posts: 37
    • View Profile
hi naitlee, if i can just one question.
what a diff template is and how it works

tks


Offline NaitLee

  • Tireless poster
  • ****
    • Posts: 203
  • Computer-brain boy
    • View Profile
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.
"Computation is not forbidden magic."
Takeback Template | PHFS


Offline dj

  • Tireless poster
  • ****
    • Posts: 291
  • 👣 🐾
    • View Profile
    • PWAs
A diff tpl that adds 3D effect

Added some tags, so that the Star Wars theme works with more templates.
« Last Edit: October 28, 2020, 02:29:08 AM by dj »