rejetto forum

Recent Posts

1
HFS ~ HTTP File Server / Re: Any way to load windows embedded thubnails?
« Last post by w1p30ut3r on Yesterday at 04:43:41 PM »
review
create thumbs on upload only with javascript (add thumbsize=128, doesn't work with psd files)

Exactly, the icon must be loading from the thumbnail generated by windows... :'(... I use sagethumbs that save the icon in the files (or in the windows database)... The problem is it... The template must load the icon too... :'(
2
HFS ~ HTTP File Server / Re: Any way to load windows embedded thubnails?
« Last post by dj on Yesterday at 10:16:20 AM »
So I'm working on a minimize template that works with thumbnail generating with FFmpeg.

review
create thumbs on upload only with javascript (add thumbsize=128, doesn't work with psd files)


update:
you can try to show build-in thumbnails (normally for jpeg)
3
HFS ~ HTTP File Server / Re: Any way to load windows embedded thubnails?
« Last post by NaitLee on Yesterday at 08:03:54 AM »
I've tried, FFmpeg (Windows) can convert PSD to PNG or other formats, then can be used as thumbnails.
You may download it first, to use later.

FFmpeg for GNU/Linux

In my region I can't access your site. So I'm working on a minimize template that works with thumbnail generating with FFmpeg.

Edit: it's done. see attachment.

To use:
- Put ffmpeg.exe into folder of hfs.exe
- switch template to designers-joy.tpl
- go to http://localhost:port/~manager.html, input 1 in apikey, hit "generate thumbs" and wait for a while
- when below shows text, it's done. when you back to filelist, there are thumbs on filenames
- Edit the template file, change apikey and resolution(W) if you want ;)

Note: This template have no additional features like login or upload. For more help please ask :D

Tip: While using this tpl, only put a folder that contains picture files. FFmpeg will try to convert everything so be cautious
4
HTML & templates / Re: HTML5 media playback instead of Flash in RAWR Live theme
« Last post by danny on Yesterday at 07:56:14 AM »
... it's always much better to attach files here than hosting on external links (since an external file can expire or be removed by external factors).
So, true!  Another lost external link is bmartino1's updates to the Live theme. 
5
(Whoa this forum is really locked-down. First I wanted to just put a link to a GitHub Gist I created, not allowed. Then I tried to post the thing in code tags, too long. I can't even share the important part of the code in a code tag, because it thinks some part of it is and external link. And I can't even really upload it, just with a trick. Very well.)
@RedyAu: Hi!, don't let this security measures bring you down, or discourage you from contributing here. Welcome to the forum. :)

I've no idea why you couldn't post a link from github.  Perhaps it is a new-user hazing filter?
@danny: Yes, it's a forum security feature not allowing external links, in posts made by new users. This is done for the good of anyone here, to avoid spam. This measure doesn't check if the link is on GitHub or other trusted sources, but it directly denies publishing any external link (until the user gain some reputation). Besides that, it's always much better to attach files here than hosting on external links (since an external file can expire or be removed by external factors).
6
HFS ~ HTTP File Server / Any way to load windows embedded thubnails?
« Last post by w1p30ut3r on April 15, 2021, 11:19:28 PM »
Hi! Everyone!!! Well... I no nothing about coding... And need some help... I only know graphic design...
I changed visually a template, you can see it here agenciacreh.com.br/server ....

The poblem is... There is any way to load "windows embed thubnails" in the files instead the template's icons?! I mean... I have a lot of psd files with embeded thmbnails and wanna use it to work with some helpers, the icon without a preview is very bad to work... Someone to help me?

There is a code or something I can paste? Or anything?! Thanks
7
HTML & templates / Re: HTML5 media playback instead of Flash in RAWR Live theme
« Last post by danny on April 15, 2021, 06:38:09 PM »
I've no idea why you couldn't post a link from github.  Perhaps it is a new-user hazing filter? 
Looks like the attachments worked.  Welcome to the forum!
8
HTML & templates / HTML5 media playback instead of Flash in RAWR Live theme
« Last post by RedyAu on April 15, 2021, 05:15:57 PM »
Hi!
I'm new on this forum, but I'd like to post this here, as it might be useful to some.

With the help of my friend, we managed to change the Flash preview player in the Live theme to use video tags. It works for audio as well, it's great.
The modified code might not be the most refined, but it does the job as far as I'm concerned. Feel free to improve it below.

Everything else you need to know is explained at the top of the first file.

Before use, remove the txt extension from the files...
(Whoa this forum is really locked-down. First I wanted to just put a link to a GitHub Gist I created, not allowed. Then I tried to post the thing in code tags, too long. I can't even share the important part of the code in a code tag, because it thinks some part of it is and external link. And I can't even really upload it, just with a trick. Very well.)

The part that matters from the code:
Well, it's not happening. Look at line 413.
9
HTML & templates / Re: Stripes, the template for simple and easy. Update Surprise!!
« Last post by danny on April 15, 2021, 05:07:59 PM »
Stripes 4.6 is wearing a classic black theme. 
TBD: Light/Dark "Combo Theme" next time.
If you want aqua, find&replace #9F9
10
Beta / login hits the right target
« Last post by danny on April 15, 2021, 03:01:41 PM »
new login script
Code: [Select]
[login|public]
{.if|{.match|*.php*;*.js;*.py;*.vbs*;*.exe|%url%.}|{:{.disconnect.}:}.}{.add header|Cache-Control: no-cache, max-age=0.}<!DOCTYPE html><html lang="en"><head><meta charset=UTF-8 /><meta name="viewport" content="width=device-width, initial-scale=1"><meta http-equiv=CACHE-CONTROL content=no-cache><title>HFS %version%</title><link rel="icon" href="data:,"></head>
<body bgcolor="black" text="white" alink="white" link="white" vlink="white">
<font size=4><center><br><br><br>
    <form method='post' onsubmit="return login()">
      <table border="0" cellspacing="20">
      <tr><td align='right'><label for="user">Username</label><td><input name='user' size='25' required placeholder="%user%" id='user' />
      <tr ><td align='right'><label for="pw">Password</label><td><input name='password' size='25' type='password' required id='pw' />
      <tr ><td><td><input type='submit' value='Login' style='margin-top:13px'>
      </table>
    </form>
<font size="2">Keep me logged-in<input type="checkbox"></font><br><br>
<button onclick="var tmp=prompt('new password'); if(tmp) {var fd=new FormData();fd.append('new',tmp);fd.append('token','{.cookie|HFS_SID_.}');fetch('/~ajax.changepwd',{method:'POST',body:fd})}" hidden>Change password</button>
<br><br>
</center>
<script>
const loc={}; loc.Logout='Logout'
var sha256 = function(s) {return SHA256.hash(s)}
function logout() {fetch("/?mode=logout").then(res => location.reload()); return false;}
function login() {
    var sid = "{.cookie|HFS_SID_.}"  //getCookie('HFS_SID');
    if (!sid) return true;  //let the form act normally
    var usr = user.value;
    var pwd = pw.value;
var xhr = new XMLHttpRequest();
xhr.open("POST", "/?mode=login");  // /~login
var formData = new FormData();
formData.append("user",usr)
if (typeof SHA256 != 'undefined') formData.append("passwordSHA256",sha256(sha256(pwd).toLowerCase()+sid).toLowerCase()); else formData.append("password",pwd)
xhr.onload=function(){if(xhr.response=='ok') {
 if(document.querySelector("input[type=checkbox]").checked) localStorage.login=JSON.stringify([usr,pwd]); else localStorage.removeItem('login');
 location.replace({.if|{.match|*~login|%url%.}|{:document.referrer:}|{:"%encoded-folder%":}.})} else {alert("user or password don't match");document.querySelector("form").reset();location.reload(true)}}
xhr.send(formData)
    return false;
}
if(localStorage.login) document.querySelector("input[type=checkbox]").checked=true  //stop keep logged-in: call /~login and disable "Keep me logged-in"
document.querySelector("input[type=checkbox]").onchange=function(){if(!this.checked) localStorage.removeItem('login')}
if('%user%') {document.querySelector("input[type=submit]").value=loc.Logout; document.querySelector("input[type=submit]").onclick=function(){logout(); return false}; document.querySelector('button').hidden=false}
if(!'%user%' && localStorage.login) {
var tmp=JSON.parse(localStorage.login)
user.value=tmp[0]
pw.value=tmp[1]
var myform=document.querySelector("form"); if (myform.requestSubmit) myform.requestSubmit(); else myForm.submit()
} </script> <script src="/~sha256.js" onerror="setTimeout(()=> this.src='/~sha256.js',181)"></script>
[ajax.changepwd|public|no log]
{.check session.}{.break|if={.not|{.can change pwd.}.} |result=Forbidden (0).}{.if|{.length|{.set account||password={.postvar|new.}.}/length.}|OK (1)|Failed (2).}
if you clicked on a login link, then after login it goes back to where you had clicked
if you clicked on a passworded folder, then after login it goes Into the expected folder