rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: evehq on October 15, 2021, 09:47:41 PM

Title: About "hits"
Post by: evehq on October 15, 2021, 09:47:41 PM
Hello, is my first post here, i love this app but i want to temove that column "hits" ¿is posible? thanks.
Title: Re: About "hits"
Post by: LeoNeeson on October 16, 2021, 07:50:45 AM
It's possible, you just have to edit the template.
(Sorry, I have little time to give you more help)
Title: Re: About "hits"
Post by: evehq on October 16, 2021, 07:20:55 PM
somebody can help me please? i tried but i couldnt
Title: Re: About "hits"
Post by: Mars on October 17, 2021, 12:56:00 AM
attach your hfs.tpl in a new post
Title: Re: About "hits"
Post by: LeoNeeson on October 18, 2021, 03:24:35 PM
Instructions:
1) Go to HFS, Virtual File System
2) Right click on the Home/Root
3) Properties...
4) Diff template
5) Paste this text:

Code: [Select]
[+]
<script>
$('tr').each(function() {
    $(this).children('td:eq(3)').remove();
    $(this).children('th:eq(3)').remove();
});
</script>

6) Click on 'Apply' and 'OK'.
This is only valid for HFS v2.3m (default template)

Welcome to the forum... :)
Cheers,
Leo.-
Title: Re: About "hits"
Post by: tamy on December 24, 2021, 05:38:13 PM
Thanks, Leo!
Was seeking the same problem solution and your answer was a goldmine for me.
Title: Re: About "hits"
Post by: pss0ft on January 09, 2022, 07:25:04 PM
Hi Guys,

I just want to do the opposite and display the hits in the default template of HFS 2.4.0 R7. This is missing in the default template and it was present in version 2.3 default template of HFS.  Anyone who can help me with that? Browsing through the WIKI did not help me out.

What we could use is a more structual explanation of a template layout and I also wonder how up-to-date is the documentation regarding the version 2.4.0 of HFS?

Kind regards,
Henk
Title: Re: About "hits"
Post by: rejetto on January 09, 2022, 09:49:21 PM
https://www.rejetto.com/wiki/index.php/HFS:_Template_symbols
what you are searching for is %item-dl-count%
you can decide to add it where you see it fit
Title: Re: About "hits"
Post by: pss0ft on January 10, 2022, 01:33:34 PM
Hello Rejetto,

Thank you for the quick reply. I am a novice in editting templates. HTML and javascript is not a problem, but I have no idea where to add %item-dl-count%. The part I am thinking about is in a screenshot attached. Somewhere in the neighbourhood of %list%, but that did not work.

Kind regards,
Henk
Title: Re: About "hits"
Post by: pss0ft on January 10, 2022, 02:33:08 PM
Hi Rejetto,

I found the right place. Now struggeling with adding an icon from Font Awsome. :-) HFS is running at ftp.ph5hp.nl and only when my main computer is running :-)

Kind regards,
Henk
Title: Re: About "hits"
Post by: rejetto on January 11, 2022, 04:33:10 PM
for the font part there's a difficulty.
HFS 2 default template is using a reduced version of font-awesome, with only the icons it's using.
this is done through this generator https://fontello.com/

if you wan to go with it, you'll have to click the wrench and import this configuration file
https://raw.githubusercontent.com/rejetto/hfs2/master/fontello.json

it will then produce a new output that you will have to copy in the hfs template replacing the existing one.

You may consider using HFS 3, that's a build-in-progress but I would assist you.
Title: Re: About "hits"
Post by: rejetto on January 11, 2022, 04:56:55 PM
if you want to stick to HFS 2 there's a much easier solution anyway: you take the icons you need as single files, and you make sure they are accessible via HFS.
Then you just refer to their address in the html/css.
If you need to, you can hide them in the VFS.
Title: Re: About "hits"
Post by: pss0ft on January 11, 2022, 09:55:06 PM
Hi Rejetto,

I will look into HFS3... I like to experiment as I am a HamRadio Operator too :-) ... Thank you for your replies and that wonderfull program HFS.

Kind regards,
Henk - www.ph5hp.nl
Title: Re: About "hits"
Post by: danny on January 13, 2022, 03:20:24 PM
...Now struggling with adding an icon from Font Awsome. :-) ...
Alternatively, you can use a unicode icon, which is most efficient anyway (because it already exists at the client's browser).  The 6-digit versions are usually in full color.  &#127909; 

In order from best to worst:
1. Unicode icons (best--no shipping charge)
2. Fonts (costs a little bandwidth to send them)
3. Base64 encoded icon (very colorful icon is too big, but 16-color icon is okay)
4. Icon files (worst and slowest, because each file makes a separate trip).

Instead of storing the template as an ANSI encoded file, you can use UTF-8, which is editable with Notepad++ open source editor; And, a UTF-8 can store emoji's so much easier, just copy and paste from https://emojipedia.org/   Microsoft Notepad won't do; so, you'd need this:  https://notepad-plus-plus.org/  (click the Encoding menu) and save your icons directly in the template. 😺
Title: Re: About "hits"
Post by: rejetto on January 13, 2022, 05:39:18 PM
nice suggestion,  i will consider unicode icons as a fallback
Title: Re: About "hits"
Post by: danny on January 13, 2022, 09:12:15 PM
nice suggestion,  i will consider unicode icons as a fallback
It is the way. 
🐈
Title: Re: About "hits"
Post by: rejetto on February 22, 2022, 07:23:47 PM
other discussion moved to dedicated topic
https://rejetto.com/forum/index.php?topic=13525.0