Author Topic: Old default template for new and legacy browsers  (Read 1349 times)

0 Members and 1 Guest are viewing this topic.

Offline LeoNeeson

  • Tireless poster
  • ****
  • Posts: 684
  • Still busy...
    • View Profile
    • twitter.com/LeoNeeson
Old default template for new and legacy browsers
« on: November 05, 2018, 07:00:25 AM »
Since Rejetto has updated the default template of HFS v2.4 to a new responsive mobile-friendly version (and also have updated jQuery from v1.4.2 to v1.12.4), I decided it's time to release a specially modified version of the old default template you found on past HFS versions, up to v2.3m, supporting both new and legacy browsers. The only modification I did is embedding the old jQuery v1.4.2, and the rest of the code is untouched. This file was taken from the source code of v2.3m (default.tpl).

You can use this old default template (that's attached to this post) on HFS v2.4 and newer versions too, but keep in mind that Rejetto only gives support to browsers not older than JAN/2006 with some exceptions (as he stated here), so keep in mind that the use of this template is officially unsupported (and unless Rejetto says otherwise, I'm currently the only one who gives support for it, but rest assured this template is rock-solid stable).

In the case you use an old custom template (that makes use of old jQuery) on a legacy browser (older than 2016), you will need to make the following modification, simply replacing this text (marked in red):

Quote
<script type="text/javascript" src="/?mode=jquery">

...to the following text (marked on green color):

Quote
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">



Or if you want to make it work offline (because you use HFS on a LAN, without internet access), the modification is more complex (and is exactly the same modification I did on the attached template), and you need to use this:

Quote
<script type="text/javascript" src="/?mode=section&id=jquery.js">

And also add the following text, before this section: [file=folder=link|private]

Quote
[jquery.js|no log|cache]
/* Copy and paste here the contents of the jQuery v1.4.2 file */



If you have any doubts, use as reference the template attached to this post, or feel free to ask me for help, by leaving a message here, in this post (the support I'm giving is limited only to make work the old jQuery v1.4.2 with your template, and nothing else). If your template doesn't use jQuery at all, you don't need to make any modification. An alternative to this template, is using 'The really fast Throwback (retro) template' made by danny.

Enjoy! :) ...and don't forget to leave a comment if you find this useful!
(and thanks to Rejetto for making it the default template for almost 8 years)

Code: [Select]
File: legacy-template.tpl
MD5: 048E8A2A4A4F6AA8D6B544A24CECE11F

Cheers,
Leo.-
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» All my work/posts/data anywhere on internet is on Public License!

Offline Rapid

  • Occasional poster
  • *
  • Posts: 35
    • View Profile
    • R&Q Portal
Re: Old default template for new and legacy browsers
« Reply #1 on: May 08, 2020, 08:52:07 AM »
As 2.4 is closer to release, I think this template can be popular.
Could you explain, why you using jquery 1.4 instead of 1.12?

And could you make version for included into 2.4 jquery 1.12?
I think here would be better place to have old template for new versions.

Offline LeoNeeson

  • Tireless poster
  • ****
  • Posts: 684
  • Still busy...
    • View Profile
    • twitter.com/LeoNeeson
Re: Old default template for new and legacy browsers
« Reply #2 on: May 09, 2020, 06:30:35 AM »
Could you explain, why you using jquery 1.4 instead of 1.12?
Because jQuery v1.4.2 (Feb 13, 2010) works better than v1.12.4 (May 20, 2016) on some old browsers. Since HFS v2.3m comes by default with jQuery v1.4.2, and the idea is to maintain compatibility with legacy browsers, it was a logical decision to use that jQuery version. When the template was changed (on early builds of HFS v2.4), this was already discussed here.

And could you make version for included into 2.4 jquery 1.12?
I did it in the past (check this file, posted on this post), and I will do it again when a stable 2.4 version is released. But for whatever reason, if you take the default 2.4's template (and bundle it with jQuery v1.12.4), and try to use that new template on v2.3m, it will NOT work as expected on HFS 2.3m. For example, some buttons are missing, and folders are not being displayed. I did some tests again today (and I verified jQuery v1.12.4 were loaded correctly), but for some unknown reason, the new 2.4's template don't work correctly on v2.3m. I've reported that to Rejetto (here), and he said that was "because 2.4 fixed some bugs related to the template loading", but it's unclear for me why we could not make it work on v2.3m. I'm sure if we do some extra modifications, we could make it work on v2.3m too. If you find the solution to this, please send me a PM (Private Message), or open a separate thread to discuss it.

I think here would be better place to have old template for new versions.
Exactly, this thread is meant to be a 'repository' of old templates.
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» All my work/posts/data anywhere on internet is on Public License!