Author Topic: Introducing: The really fast Throwback (retro) template. Updated.  (Read 15177 times)

0 Members and 1 Guest are viewing this topic.

Offline Mars

  • Operator
  • Tireless poster
  • *****
  • Posts: 1869
    • View Profile

Offline danny

  • Occasional poster
  • *
  • Posts: 59
    • View Profile
    • Startfetch
Re: Introducing: The really fast Throwback (retro) template. Updated.
« Reply #76 on: September 15, 2018, 02:34:54 PM »
Solution is inside this post

http://rejetto.com/forum/index.php?topic=11546.msg1059974#msg1059974
Unfeasible with multiple users. If several users list files at the same time, server-side synchronous processing causes more dramatic loss of speed. With many files there's a long time to wait, as if broken. Inefficient workaround isn't a substitute for an efficient baked-in short date format.   If Rjetto makes that new standard template that works with phones; also, he will soon need %item-modified-mdy% short date (12.25.18) functionality, with better efficiency.

Until then, a possible workaround solution involves the Client's CPU (because there are many), not the server's CPU (only one--don't jam it).  Client side processing would be a script to reformat %item-modified%, preferably with async/non-blocking processing. 

I don't know how, but DJ does.

Offline Mars

  • Operator
  • Tireless poster
  • *****
  • Posts: 1869
    • View Profile
Re: Introducing: The really fast Throwback (retro) template. Updated.
« Reply #77 on: September 15, 2018, 05:20:01 PM »
Quote
[+file]
<td>%item-size%B<td><script type="text/javascript" >mdy(%item-modified-dt%)</script><td>%item-dl-count%

[+folder]
<td class='nosize'>{.!folder-item|folder.}<td><script type="text/javascript" >mdy(%item-modified-dt%) </script><td>%item-dl-count%

Quote
[lib.js|no log]
// <script> // this is here for the syntax highlighter


function mdy(data) {
   var options={ year: '2-digit', month: '2-digit', day: 'numeric' }
   var locales=navigator.language;
   document.write( new Date((data*24-613658)*3600*1000).toLocaleString(locales, options));
}


function outsideV(e, additionalMargin) {
......
« Last Edit: September 15, 2018, 08:58:42 PM by Mars »

Offline dj

  • Occasional poster
  • *
  • Posts: 96
  • 👣 🐾
    • View Profile
    • PWAs
Re: Introducing: The really fast Throwback (retro) template. Updated.
« Reply #78 on: September 15, 2018, 08:34:40 PM »
Until then, a possible workaround solution

my modified addon, adapted to throwback1998

Code: [Select]
[+]
<script>  //formatmodified for mobil-light.tpl
//use ISO Date Format in hfs
var options={ year: '2-digit', month: '2-digit', day: 'numeric' }  //edit here
 //year, month, day, hour, minute, second  "numeric", "2-digit"; weekday  "narrow", "short", "long"
var locales=navigator.language

var ref=document.querySelectorAll('td:nth-child(3) font')  //addapted to throwback1998
if(!ref.length) ref=document.querySelectorAll('tr td:nth-child(3)')  //std-tpl
for (var i=0; i<ref.length; i++)  {
 var tmp=Date.parse(ref[i].textContent.slice(0,19))
 if(tmp) ref[i].textContent = new Date(tmp).toLocaleString(locales, options)
}

</script>

Offline Mars

  • Operator
  • Tireless poster
  • *****
  • Posts: 1869
    • View Profile
Re: Introducing: The really fast Throwback (retro) template. Updated.
« Reply #79 on: September 15, 2018, 08:47:23 PM »
Thank you DJ for the idea, my previous post edited accordingly regarding the javascript part ,works as simply as necessary ;)

I'm still working on the changes that can be made to the default template with a minimum of modifications and that are as simple as possible

probably it will not work on platforms where javascript is disabled,  I do not know if it also has an impact on jquery
« Last Edit: September 15, 2018, 09:22:54 PM by Mars »

Offline danny

  • Occasional poster
  • *
  • Posts: 59
    • View Profile
    • Startfetch
Re: Introducing: The really fast Throwback (retro) template. Updated.
« Reply #80 on: October 03, 2018, 04:49:34 PM »
I'm still working on the changes that can be made to the default template with a minimum of modifications and that are as simple as possible
That is a good project! 
It looks like the functions/menus will have to be moved to the top of the phone/tablet screen, so that the file listing will fit on-screen.
See also the [error] section from inside of a throwback template, because it bypasses most errors instead of claiming a broken server.  Also, see Leo's code that can get the phones logged in, even if they don't have the Firefox Mobile browser (Leo's code will be incorporated into the next version of the Throwback template).  Lastly, have a look at the throwback template's unicode support, both the font declaration and the use of instantaneous unicode icons instead of sending a little photo per each file listed (the difference in bandwidth isn't much, but the difference in lag-time is huge, since schlepping photos burdens the server cpu and unicode characters don't do that).  It won't take much scrolling labor to pick out the good stuff from the Throwback templates, because they're 24 times shorter than the standard template. 

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12942
    • View Profile
Re: Introducing: The really fast Throwback (retro) template. Updated.
« Reply #81 on: October 04, 2018, 10:21:04 PM »
for those interested in reducing the CPU load on the server, make a test disabling "use system icons" under Menu > virtual file system.

Offline DarkIllusion

  • Occasional poster
  • *
  • Posts: 1
    • View Profile
Re: Introducing: The really fast Throwback (retro) template. Updated.
« Reply #82 on: October 23, 2018, 04:18:27 AM »
Awesome template. Many thanks!

Follow members gave a thank to your post:


Offline danny

  • Occasional poster
  • *
  • Posts: 59
    • View Profile
    • Startfetch
Re: Introducing: The really fast Throwback (retro) template. Updated.
« Reply #83 on: January 02, 2019, 04:04:18 PM »
for those interested in reducing the CPU load on the server, make a test disabling "use system icons" under Menu > virtual file system.
The Throwback templates don't utilize that feature. 
Instead, there's unicode support and use of unicode icons (not image files).  The only graphics used are those that exist aboard the client (many) not the server (one).  That was done for scalability.  Throwback9 also demonstrates how to add more features with asynchronous (non-blocking) code, for scalability. 

But, I still haven't figured out how to shorten the phone-unfriendly Four Score And Seven Years Ago plus extra clock, verbose %item-modified% without slowing down the file listings.  There were some scripts proposed (using the client's cpu for scalability), but I wasn't clear on how to install them in the template.  I put in a few days trying it though.  No luck yet.

Edit:  A phone screen friendly file date looks like  mm.dd.yy (the smallest size possible)
« Last Edit: January 02, 2019, 04:12:09 PM by danny »

Offline bmartino1

  • Tireless poster
  • ****
  • Posts: 828
  • I'm only trying to help i mean no offense.
    • View Profile
    • none - google translate
Re: Introducing: The really fast Throwback (retro) template. Updated.
« Reply #84 on: January 02, 2019, 05:33:49 PM »
http://www.rejetto.com/wiki/index.php/HFS:_scripting_commands#Others

Probably a macro manpulatuon

time | A
returns current time information. The format is specified by optional parameter A. Refer to this page for format syntax. If A is not supplied, value "c" will be used.
Optional parameter when to specify a time other than current.
Optional parameter offset to specify the number of days differing from the current time

%time% which give us the full extent time day etc

Or mby pull from the client not the server

https://www.w3schools.com/html/html_form_input_types.asp
And do a reverse feed script to output the current date in the format you want.

Input Type Date
The <input type="date"> is used for input fields that should contain a date.

Depending on browser support, a date picker can show up in the input field.

https://www.w3schools.com/js/js_dates.asp

« Last Edit: January 02, 2019, 05:37:09 PM by bmartino1 »
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline LeoNeeson

  • Tireless poster
  • ****
  • Posts: 556
  • Solitario...
    • View Profile
    • twitter.com/LeoNeeson
Template bug found on v2.4 beta 6!
« Reply #85 on: January 03, 2019, 12:42:12 PM »
@Rejetto: Template bug found on v2.4 beta 6!

I've tried Throwback1998.tpl and Throwback9.tpl on the latest v2.4 beta 6, and it looks like a bug was introduced on beta 6, since on beta 5 was working fine (see screenshots). The bug is that 'files panel' is not shown when using those templates! (I can't find the reason why it happens).

Can you add %item-modified-mdy% short format 12.25.18 file date?
If this is added to HFS's source code, then some other common formats should be added too:
%item-modified-mdy% = MONTH-DAY-YEAR short format > 12.25.18 (proposed by danny)
%item-modified-dmy% = DAY-MONTH-YEAR short format > 25.12.18 (proposed by me)
%item-modified-ymd% = YEAR-MONTH-DAY short format > 18.12.25 (also useful)

Cheers,
Leo.-
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
• I'm open to help and share any file you may need (just ask me) ;)

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12942
    • View Profile
Re: Introducing: The really fast Throwback (retro) template. Updated.
« Reply #86 on: January 05, 2019, 04:11:28 PM »
@Rejetto: Template bug found on v2.4 beta 6!

thanks! it's the %files% symbol, stopped working. Fixed in next build.

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12942
    • View Profile
Re: Introducing: The really fast Throwback (retro) template. Updated.
« Reply #87 on: January 05, 2019, 04:14:58 PM »
for the timestamp: that's why i introduced %item-modified-dt%
such format is compatible with {.time.} and you can transform it as you want.

Offline danny

  • Occasional poster
  • *
  • Posts: 59
    • View Profile
    • Startfetch
New goodies added:

Login from Leo
Del from DJ
File listing speed from TB9

« Last Edit: February 26, 2019, 05:08:32 PM by danny »

Follow members gave a thank to your post:


Offline LeoNeeson

  • Tireless poster
  • ****
  • Posts: 556
  • Solitario...
    • View Profile
    • twitter.com/LeoNeeson
Re: Introducing: The really fast Throwback (retro) template. Updated.
« Reply #89 on: January 19, 2019, 02:28:31 PM »
Very nice! :D I quickly tested and everything looks good, congrats.
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
• I'm open to help and share any file you may need (just ask me) ;)

Follow members gave a thank to your post: