rejetto forum

version 2.4

rejetto · 474 · 417521

0 Members and 2 Guests are viewing this topic.

Offline vladimirov70

  • Occasional poster
  • *
    • Posts: 29
    • View Profile
    • Honest news about a special military operation in Ukraine.

2. the pictures are displayed. I thought it was good, and people wanted to download could do it by saving/right clicking, but if this is not clear enough it's not good. So, i should change the default behaviour for this.
the pictures are displayed - it's good, I like it. I just showed that this function works. Anyone who needs to download can do it with the right mouse button.
Ukraine has been killing thousands civilians in Donbass for eight years. Ukraine killed 152 children and wounded 146. Russia does not start wars - it ends them.http://www.picshare.ru/uploads/220501/9d838wOcqM.jpg


Offline TEA-Time

  • Occasional poster
  • *
    • Posts: 76
    • View Profile
Hey everyone,


I'm running v2.4 RC7 with the RC6 template.  Is it possible to make a link I created in a folder open in a new tab/window by default, without having to shift or ctrl+click it?  As it stands, it takes the HFS page to where the link points.


Thanks!
-Tim


Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 859
  • Status: On hiatus       (sporadically here)
    • View Profile
    • twitter.com/LeoNeeson
Is it possible to make a link I created in a folder open in a new tab/window by default, without having to shift or ctrl+click it?
Hi Tim, sorry for my late reply.
It's easy, just do this...

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>
$("div[class^=item-type-link]").each(
 $('a').each(function(){
  $(this).attr('target', '_blank');
 })
);
</script>

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

Cheers,
Leo.-
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.


Offline danny

  • Tireless poster
  • ****
    • Posts: 281
    • View Profile
. . . it just stops taking new connections, switching the server off and then on fixes it, i couldn't find why this happens and had to resort to run a script that checks 24x7 if hfs is not accepting downloads and kills it and runs it again.
Do you use the Watchcat2 script? https://rejetto.com/forum/index.php?action=dlattach;topic=12055.0;attach=9809

The stuck/off server is made worse by running limits (hfs menu > limits) that make HFS get more busy and stuck more often.
The Worst is Speed limit.  Instead of HFS speed limit, you could spend 3 dollars on a 100 megabit USB2 adapter, assign it a fixed address and assign HFS to the megabit>USB adapter's ip address.   If you were to accidentally get a gigabit adapter, (and therefore get stuck), just go to properties of the network adapter and manually set 100-half.  This also applies to single-thread versions of most web servers. 

Upload and download at the same time will probably get stuck If the connection speed is high.  Perhaps a clever programmer could figure out complete lockout/tagout logic to thoroughly prevent simultaneous uploads+downloads?  The problem is not severe at 100megabit and lower speeds. 

Edit: HFS2.4 RC7 has 'archive-only-selected' for overload protection; however, earlier versions can try to download the entire server with just one click on the archive button (stuck in 1 click).  Possible fixes include search and disable the recursive function. . . Or switch to the RC7 template or takeback or throwback or stripes.  Since the archive feature makes .tar files that the user doesn't want, removing the archive button is an option. 

EDIT:  See HFS 3 https://github.com/rejetto/hfs
« Last Edit: November 29, 2022, 05:35:34 PM by danny »


Offline TEA-Time

  • Occasional poster
  • *
    • Posts: 76
    • View Profile
Hi Tim, sorry for my late reply.
It's easy, just do this...

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>
$("div[class^=item-type-link]").each(
 $('a').each(function(){
  $(this).attr('target', '_blank');
 })
);
</script>

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

Cheers,
Leo.-

It works.  :)   Thank you very much!


-Tim


Offline easyspot

  • Occasional poster
  • *
    • Posts: 14
    • View Profile
Hi, I saw HFS v3 now in the work, so the latest ever HFS v2.4 will be at rc7 ?


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
I'm not willing to work on it anymore, but I won't stop anybody from doing it on my place. It's open source.


Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 859
  • Status: On hiatus       (sporadically here)
    • View Profile
    • twitter.com/LeoNeeson
A few days ago, I've received a private message from "TEA-Time", and he said that my code posted previously here, takes effect even on links to folders too (it's true, I misinterpreted his original request). What he wants is just to open in a new tab/window, only the "URL type" of links (those you get by right-clicking on "Root » New link"). Having this in mind, please follow the very same given instructions, but then on step 5, paste the following text:

Code: [Select]
[+]
<script>
$("img").each(function () {
    if($(this).attr("src").indexOf('~img_link') > -1) {
         $(this).parent().attr('target', '_blank');
    }
});
</script>

This is only valid for the default template of HFS (has been successfully tested with v2.4.0 RC6, RC7 and even with older v2.3m).

I hope that is useful... :)
Cheers,
Leo.-
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.


Offline TEA-Time

  • Occasional poster
  • *
    • Posts: 76
    • View Profile
A few days ago, I've received a private message from "TEA-Time", and he said that my code posted previously here, takes effect even on links to folders too (it's true, I misinterpreted his original request). What he wants is just to open in a new tab/window, only the "URL type" of links (those you get by right-clicking on "Root » New link"). Having this in mind, please follow the very same given instructions, but then on step 5, paste the following text:

Code: [Select]
[+]
<script>
$("img").each(function () {
    if($(this).attr("src").indexOf('~img_link') > -1) {
         $(this).parent().attr('target', '_blank');
    }
});
</script>

This is only valid for the default template of HFS (has been successfully tested with v2.4.0 RC6, RC7 and even with older v2.3m).

I hope that is useful... :)
Cheers,
Leo.-

Excellent, that's just what I was looking for.  Sorry I wasn't more clear.

Thank you so much for the help, Leo. 👍