rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - D

Pages: 1 2
1
HTML & templates / Re: Custom folder previews
« on: October 28, 2021, 06:31:11 AM »
The question is still relevant, can someone help, please?

2
HFS ~ HTTP File Server / Re: Why file system cleared?
« on: October 04, 2021, 07:25:25 AM »
Same, and my backup got overwritten by autosave :(

3
Bug reports / False errors on upload
« on: September 16, 2021, 10:54:00 PM »
They only appear in logs. I'm using HFS 2.3m

Code: [Select]
Upload failed for 20210916_221111.jpg: Not allowed.
Upload failed 20210916_221111.jpg
Upload failed for 20210916_221155.jpg: Not allowed.
Upload failed 20210916_221155.jpg
Upload failed for 20210916_221259.jpg: Not allowed.
Upload failed 20210916_221259.jpg
Requested POST /
Uploading 20210916_221111.jpg
Fully uploaded 20210916_221111.jpg - 71.2 K @ 316.4 KB/s
Uploading 20210916_221155.jpg
Fully uploaded 20210916_221155.jpg - 114.0 K @ 797.2 KB/s
Uploading 20210916_221259.jpg
Fully uploaded 20210916_221259.jpg - 163.8 K @ 1.1 MB/s

4
HTML & templates / Re: Custom folder previews
« on: September 15, 2021, 10:07:34 AM »
for hfs2.4
Thanks. How can I move these images into Hits column?

5
HTML & templates / Re: Custom folder previews
« on: September 14, 2021, 04:48:30 PM »
Okay, variant with images behind buttons:
Code: [Select]
[+]
<script>
var list=document.querySelectorAll("table#files>tbody>tr");
function changepic(a1)
{
  var alink=a1.querySelector("a");
  var adress=alink.getAttribute("href");
  if(adress.endsWith("/"))
  {
  adress+="p.jpg";
  var button=document.createElement("button");
  button.setAttribute("onclick","showPreview(this)");
  button.setAttribute("link",adress);
  button.setAttribute("type","button");
  a1.children[3].setAttribute("style","text-align:center");
  a1.children[3].appendChild(button);
  button.appendChild(document.createTextNode("Preview"));
  } 
}
list.forEach(changepic);
function showPreview(butt)
{
  butt.setAttribute("style","display:none");
  var par=butt.parentElement;
  var img=document.createElement("img");
  img.setAttribute("src",butt.getAttribute("link"));
  par.appendChild(img);
}
</script>

6
HTML & templates / Custom folder previews
« on: September 11, 2021, 09:36:48 PM »
Let's say I have following folders

New folder
New folder 2
New folder 3

Each contains a "p.jpg", I want to use these as folder preview. Attached an example

The code for diff template I'm currently using:
Code: [Select]
[+]
<script>
var list=document.querySelectorAll("table#files>tbody>tr");
function changepic(a1)
{
  var alink=a1.querySelector("a");
  var adress=alink.getAttribute("href");
  if(adress.endsWith("/"))
  {
  adress+="p.jpg";
  var img=document.createElement("img");
  img.setAttribute("src",adress);
  img.setAttribute("onerror","this.style.display='none'");
  a1.children[3].appendChild(img);
  }
}
list.forEach(changepic);
</script>
eats too much cpu if there are too many folders. Because script doesn't check if p.jpg is actually present in folder

How can I fix it? Thanks in advance.

7
HFS ~ HTTP File Server / Re: about freedns?
« on: June 17, 2021, 11:41:51 AM »
Freedns only work for routers doesn't it? You need to configure it there. Or try duckdns, it has a windows gui app

8
HFS ~ HTTP File Server / Re: Is there a way to add login message?
« on: May 29, 2021, 03:56:38 AM »
Yes that's what I was looking for, many thanks.

9
HFS ~ HTTP File Server / Is there a way to add login message?
« on: May 28, 2021, 02:14:30 AM »
Like in attachment.

10
HTML & templates / Re: How can I implement thing on image attached?
« on: March 18, 2021, 01:16:30 AM »
Code: [Select]
[+]
<script>
[...document.querySelectorAll('#files a[href$="/"]')].forEach(item =>
 item.insertAdjacentHTML('afterend', '<a href="http://example.site/view-2.php?name='+item.innerText.trim()+'"> Info </a>')
)
</script>
godsend

11
HTML & templates / Re: How can I implement thing on image attached?
« on: March 16, 2021, 08:09:25 PM »
You asked me to elaborate what I'm trying to do.

Let's say I want to include this feature for folder "My"


The script above works, but globally. I only need it for folder "My"

Editing diff template



results in this


12
HTML & templates / Re: How can I implement thing on image attached?
« on: March 16, 2021, 03:31:59 AM »
But how do I insert my code into template? I tried:
Code: [Select]
[+folder]
%item-name%
this edits "Hits" column instead of "Name" one

Putting this into head of hfs.tpl worked for me:
Code: [Select]
<script type="text/javascript">
  document.addEventListener('DOMContentLoaded',function(){
    let reg1=/~img_folder"> (.*)</g;
    let reg2='~img_folder"> $1 </a> [<a href="http://example.site/view-2.php?name=$1" >Info</a>]<';
    document.body.innerHTML=document.body.innerHTML.replace(reg1,reg2);
    let reg3=/view-2.php\?name=(.*)( \-)(.*?)">/
    let reg4='view-2.php\?name=$1:$3">';
    document.body.innerHTML=document.body.innerHTML.replace(reg3,reg4);
    });
</script>
however it works globally, not only for folder I want.

13
HTML & templates / How can I implement thing on image attached?
« on: March 15, 2021, 02:28:24 AM »
I need folder names to have additional link attached automatically, with part of foldername in it:

Folder "A - B C 3" [link to example.site/view-2.php?name=A]
or
Folder "A - B C 3" [link to example.site/view-2.php?name=A: B C III]

1. How can I use foldername as variable?
2. How can I edit that variable? (%20- = %3A)
3. How can I add my link through diff template?

14
router & port problems / Re: Discuss free alternatives to no-ip
« on: March 13, 2021, 12:46:45 AM »
You can try DuckDNS (but it's untested by me, but as far I know, it doesn't expire and works well with HFS).
I am using it for some months, works like charm. My ip is dedicated though.

15
by saving the HFS options to a file you have access to the ban list
Exactly what I was looking for, thank you kindly

Pages: 1 2