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.


Topics - danny

Pages: [1]
1
Classic elegance, some new features, and a lot more speed. . .
Tested with HFS 2.3k 

Features:
Phone/Tablet viewport tag included, for the phone screen.

Much faster file listings in lengthy folders because there's no slow checkboxes.  The delete function can be provisioned for a folder (see the next post), and that method runs faster than a site-wide provision.

Automated error correction for users.  When needed, it displays very polite messages briefly, and then quickly sends the user back to what they wanted to do.  It maintains the appearance of good working order.  So, you're free to use options like the "max connections" and "maximum simultaneous downloads from single address" limits to manage your bandwidth. 

Quickly disconnects hack scans; and that feature lowers the cpu load, improving speed.

Mp3 streaming for PC via mms link that actually says MediaPlayer

Easy for users, with simplified interface, column layout, black background, and readable fonts.  Classic! 

Cat-operable on a tablet, apparently.

Efficient and colorful unicode icons displays file listings twice as fast.

Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<title>HFS %folder%</title><style type="text/css">%style%</style>
<script type="text/javascript" language="javascript">function browseAbleFolderTree(folder) {var infoFolder=folder;var path=folder.split("/");var pathTree="/";var pathTreeResult="";for(pta=1;pta<path.length;pta++) {pathTree=pathTree+path[pta]+"/";pathTreeResult=pathTreeResult +'/<a href="'+pathTree+'" class=\"swapDir\">'+path[pta]+'</a>';}document.getElementById('swapDir').innerHTML = pathTreeResult;}</script>
</head><body>
<div>
%upload-link%
%login-link%%loggedin%
<div class=lil><b>Current Directory:</b></div>
<div class=big><a href="/">Home</a><span id=swapDir>%folder%</span><script type="text/javascript" language="javascript">browseAbleFolderTree("%folder%")</script></div>
<div class=body>%folder-comment%%files%</div>
</div>
</body></html>

[login-link]
<div class=btn><a href="%encoded-folder%~login" class=inbtn><font color="yellow">&#128100; CLICK HERE TO LOG IN</font></a></div>

[loggedin]
<div class=btn><span class=inbtn>&#128100; %user%</span></div>

[style]
body{padding:3px;font-weight:normal;font-family:"Arial Unicode MS","Lucida Sans Unicode","DejaVu Sans","geneva",arial,"helvetica",sans-serif;background:black;margin:3}
.rw,.body,.inpt,.flg,.cmnt,th,comment,.flg,.inbtn,.col{background:#000}
.col,body,.rw,.body,#hm{color:#AAA}
body,.big,.lil,th,comment{font-size:9pt}
.inbtn{font-size:12pt}
.inpt,.flg,.cmnt,a,body,.inbtn,th,comment,.flg,.lil{color:#8D8}
.big{font-size:14pt}
.flg,.inbtn,.col,.rw,a,.big{font-weight:normal}
a{font-size:14pt}
.flg,.lil{font-size:8pt}
.inbtn,.body{border:3px solid #222}
.btn,.body{padding:15px}
.body{padding-right:9px}
.body{margin:15px}a{text-decoration:none}
a:visited{color:#CCC}
a:hover{color:yellow}
img{border:0}
.rw{font-size:11pt;border:2px solid #222}
.cmnt{font-size:7pt;padding:3px;margin-top:2px}
.inpt,.cmnt{border:1px inset #000}
.col{font-size:13pt}
.inbtn{padding:5px}
.btn{float:right}
.flg{text-align:center;border:1px solid;}

[upload-link]
<div class=btn><a href="%encoded-folder%~upload" class=inbtn><b><font color="yellow">&#8679; &nbsp;CLICK HERE TO UPLOAD FILES</font></b></a></div>

[up]

[nofiles]

[files]
<table class=lil width=100%>
<tr>
<td><b>%number-folders% Folders, %number-files% Files - Total Size: %total-size%</td>
<td align=right><b>At %timestamp%  %speed-out%/%number-addresses-downloading%KB</b></td>
</tr>
</table>
<table width="100%">
<tr>
<th class=col><a href="%encoded-folder%?sort=n" style="color:#AAA;font-size:14px;">FileName</a></th>
<th class=col><a href="%encoded-folder%?sort=s" style="color:#AAA;font-size:14px;">Size</a></th>
<th class=col><a href="%encoded-folder%?sort=t" style="color:#AAA;font-size:14px;">Date</a></th>
<th></th>
</tr>
%list%
</table>

[file]
<tr>
<td class=rw>%new%<a href="%item-url%">&nbsp;<font color="white">&#9671;</font>&nbsp;%item-name%</a></td>
<td class=rw align=center>%item-size%</td>
<td class=rw align=center>%item-modified%</td>
</tr>

[file.mp3 = file.m4a = file.wma = file.flac = file.ogg]
<tr>
<td class=rw>%new%<a href="%item-url%">&nbsp;<font color="#ADE8F9">&#9836;</font>&nbsp;%item-name%</a></td>
<td class=rw align=center>%item-size%</td>
<td class=rw align=center><a href="mms://%host%%encoded-folder%%item-url%">MediaPlayer</a></td>
</tr>

[file.mp4 = file.m4v = file.mkv = file.flv = file.avi = file.wmv = file.webm]
<tr>
<td class=rw>%new% <a href="%item-url%">&nbsp;<font color="teal" size="3">&#127909;</font>&nbsp;%item-name%</a></td>
<td class=rw align=center>%item-size%</td>
<td class=rw align=center>%item-modified%</td>
</tr>

[file.jpg = file.jpeg = file.png = file.gif = file.tif = file.bmp = file.webp]
<tr>
<td class=rw>%new% <a href="%item-url%">&nbsp;<font color="orange" size="3">&#128247;</font>&nbsp;%item-name%</a></td>
<td class=rw align=center>%item-size%</td>
<td class=rw align=center>%item-modified%</td>
</tr>

[link]
<tr>
<td class=rw>%new%<a href="%item-url%">&nbsp;<font color="pink">&#8663;</font>&nbsp;%item-name%</a>%comment%</td>
<td class=rw><i>&nbsp;Hyperlink</i></td>
<td></td>
</tr>

[folder]
<tr>
<td class=rw>%new%<a href="%item-url%">&nbsp;<font color="#FFFDA8" size="3">&#128193;</font>&nbsp;<b>%item-name%</b></a></td>
<td class=rw align=center><i>Folder</i></td>
<td class=rw align=center>%item-modified%</td>
</tr>

[comment]
<div class=cmnt>%item-comment%</div>

[folder-comment]
<div class=cmnt>%item-comment%</div>

[error-page]
{.if|{.match|*.php*;*.js|%url%.}|{:{.disconnect.}:}.}{.add header|Cache-Control: no-cache, max-age=0.}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8">%content%</html>

[not found]
<META HTTP-EQUIV="Refresh" CONTENT="2;URL=/"><TITLE>404</TITLE><body bgcolor="black" text="white" alink="white" link="white" vlink="white">
<center><h2><br>You have found the 404 page.</h2>Redirecting.</center></body>

[overload]
<META HTTP-EQUIV="Refresh" CONTENT="3;URL=./"><TITLE>Overload</TITLE><body bgcolor="black" text="white" alink="white" link="white" vlink="white">
<center><h2><br>High traffic mode engaged.</h2>Returning to previous page after overload has cleared.</center></body>

[max contemp downloads]
<META HTTP-EQUIV="Refresh" CONTENT="2;URL=./"><TITLE>Downloads</TITLE><body bgcolor="black" text="white" alink="white" link="white" vlink="white">
<center><h2><br>There are ongoing downloads.</h2>More available <i>after</i> current downloads finish.</center></body>

[unauthorized]
<META HTTP-EQUIV="Refresh" CONTENT="3;URL=./"><TITLE>Login</TITLE><body bgcolor="black" text="white" alink="white" link="white" vlink="white">
<center><h2><br>You're not logged in.</h2>Name and password do not match.<br><br>If there's no login, try a different<br>browser for your phone.</center></body>
{.if|%user%|{:{.set|n|{.from table|#tries|%ip%.}.}{.inc|n.}{.if|{.{.^n.} > 20.}|{:{.set ini|{.no pipe|ban-list={.from table|#ini|ban-list.}%ip%#attack? {.time.}|.}.}{.set table|#tries|%ip%=0.}:}|{:{.set table|#tries|%ip%={.^n.}.}:}/if.}:}.}

[deny]
{.redirect|/.}

[ban]
{.disconnect.}

[upload]
<html><head>
<title>Upload to: %folder%</title><style type="text/css">%style%</style>
<script type="text/javascript" language="javascript">var counter = 0;function addUpload() {counter++;if (counter < 7) document.getElementById("addupload").innerHTML += "<br><input name=\"fileupload"+counter+"\" size=\"50\" type=\"file\">";if (counter == 6) {document.getElementById("addUploadLink").innerHTML = "<a style=\"cursor:text;color:yellow;\">- PLEASE PUT MULTIPLE FILES INTO A ZIP FILE -</a>";}}</script>
</head><body>
<div class=btn><span class=inbtn>&#128100; %user%</span></div>
<div class=lil><b>Upload to:</b></div>
<div class=big><a href="/" target=_parent class=swapDir>Home</a>%folder%</div>
<div class=body>
<center>
<b>Free Space Available For Upload: %diskfree%</b><br><br>
<form action="%encoded-folder%" target=_parent method=post enctype="multipart/form-data" onSubmit="frm.upbtn.disabled=true; return true;"><div id=addupload><input name="fileupload1" size=50 type=file></div><a id=addUploadLink style="cursor:pointer;" onclick="addUpload();">- Add Upload -</a><br><br><input name=upbtn type=submit value="Upload Selected File(s)"></form>
</center>
</div>
</body></html>

[upload-results]
<html><head>
<title>Upload results for: %folder%</title><style type="text/css">%style%</style>
</head><body>
%loggedin%
<div class=lil>Upload results for:</div>
<div class=lil>%folder%</div><div class=body>%uploaded-files%<br><br><a href="%encoded-folder%" target=_parent class=big><font color="yellow">&#8678; Go Back</font></a></div>
</body></html>

[upload-success]
<li><b>SUCCESS!</b> Uploaded: %item-name% --- %item-size% (Speed: %speed% KB/s)

[upload-failed]
<li><b>FAILED!</b> Error while uploading: %item-name%: --- %reason%

[newfile]
&nbsp;<span class=flg>&nbsp;NEW&nbsp;</span>

2
in hfs.events (alt+f6)

[+request]
{.if|{.match|*.gif;*.ico;/*img*|%url%.}|{:{.add header|Cache-Control: public, max-age=31536000.}{.add header|Vary: Accept-Encoding.}:}.}

This is functionally similar to Apache .htaccess
Only the file extensions specified have been cached by the browser.

Tip:
If you decide to cache a wider variety of file extensions, it may be useful to add the reversal command {.add header|Cache-Control: no-cache, max-age=0.} into the template at the [error-page] section, so as to reduce persistence of redirects.

3
HTML & templates / build 299, still trying to log in, from a phone
« on: April 27, 2018, 03:56:23 PM »
How do I get a working login page?  (as in page)?

A large number of android devices require an HTML login page, quite like this (Except this one doesn't work):
Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><title>Login</title><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE, MAX-AGE=0"><meta name=viewport content="width=auto, user-scalable"><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"></head><body style="overflow:hidden" bgcolor=#151B54 text="white" alink="white" link="white" vlink="white"><table border="0" align="center" cellpadding="0" cellspacing="0" height="100%"><TR><TD valign="middle" align="center" style="vertical-align:center">
<div class="login" style="vertical-align:center"><font size=6>

      <h3>Log in to HFS</h3>
      <form method="post">
      Name<br>
      <input type="text" name="user" style="font-size:22"><br><br>
      Password<br>
      <input type="text" name="password" style="font-size:22"><br><br>
      <input type="submit" value="Login" style="font-size:28"><br>
      </form>

</font><><div>&nbsp;<></TD></TR></table></body></html>
Assuming:
web root has no password, no browse
The login html file is /index.html
/Files/ is password protected

Should this standard feature be working, or is there a script alternative available to run?   Halp

Pages: [1]