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 - Mars

Pages: 1 2 3 [4] 5 6 ... 124
46
Beta / Re: version 2.4
« on: November 04, 2018, 07:38:34 PM »
 may be wrong but it must be about the compatibility of old default template with the new version of jquery

47
HTML & templates / Re: base64 Re: Responsive small screen template
« on: November 03, 2018, 11:09:47 PM »
it is already very late and I have to get up early, we will continue much later if it does not hurry you  ;)

48
HTML & templates / Re: base64 Re: Responsive small screen template
« on: November 03, 2018, 10:57:39 PM »
it's enough for me to check that minor improvements work for hfs, but I know that basically I can not guarantee an executable free of defects, it's just to propose to rejetto the result of modifications
the only times I share the exe is to show the result we can have to use

49
HTML & templates / Re: base64 Re: Responsive small screen template
« on: November 03, 2018, 10:34:33 PM »
I do not bother to compare or install packages, I just have PAS files accessible in Delphi and functional.

50
HTML & templates / Re: base64 Re: Responsive small screen template
« on: November 03, 2018, 10:09:37 PM »
If you lack the resources to complete your installation, I will be able to provide them but in a few days, the time to get your hands on the archives

51
HTML & templates / Re: base64 Re: Responsive small screen template
« on: November 03, 2018, 09:47:49 PM »
@LeoNeeson
do you have what it takes on your machine to compile hfs sources and create your executable?

52
HTML & templates / Re: base64 Re: Responsive small screen template
« on: November 03, 2018, 09:36:01 PM »
it seems that I'm not up to date I'm only with OverbyteIcsV6
Quote
// ============================================================================
// D5-implementation of "US Secure Hash Algorithm 1 (SHA1)" (RFC3174)
// Copyright (c) 2001, Juergen Haible.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
// ============================================================================

{------------------------------------------------------------------------------
Update by F. Piette for ICS (http://www.overbyte.be)
Jan 10, 2004 Defined uint32_t as LongWord instead of LongInt
Jul 23, 2004 Revised SHA1Reset to check for nil reference to comply with RFC-3174
             Made the unit compatible with Delphi 2
May 08, 2007 Added a few casts to uint32_t to constants.
Jul 30, 2007 V2.00 Updated for .NET
Mar 24, 2008 V2.01 Made some changes to prepare code for Unicode
                   Use only AnsiString

------------------------------------------------------------------------------}


 with a portable vesion of Borland® Delphi® for Microsoft® Windows™ Version 10.0.2558.35231

all the resources I add are placed in a separate subdirectory in lib and added to the options in the form $ (BDS) \ lib \ ... ,  this allows my delphi to be transferred to any media as usb key for use  it on any machine

53
HTML & templates / Re: base64 Re: Responsive small screen template
« on: November 03, 2018, 09:07:54 PM »
for my use I would just add aliases  ;D

encode64=base64|$1
decode64=base64decode|$1
encodemd5=md5|$1

I was based on these two macros, encodeuri and decodeuri,  which was in the sense of continuity

do not confuse the md5 and md5 file macros that have different uses


54
Beta / Re: version 2.4
« on: October 31, 2018, 10:03:49 PM »
Quote from: rejetto
mars was just guessing, but he was not right
it's understandable, javascript gives me Urticaria on neurons  ;D

55
HTML & templates / Re: base64 Re: Responsive small screen template
« on: October 31, 2018, 09:58:01 PM »

But I was wondering if is it possible make HFS decode Base64 'on-the-fly' using a macro like: {.mime|text/css;base64.}

Also, neither of the following works:

Code: [Select]
[mystyle.css]
{.base64|YSB7dGV4dC1kZWNvcmF0aW9uOiBub25lfQ==.}

Code: [Select]
[mystyle.css]
{.base64decode|YSB7dGV4dC1kZWNvcmF0aW9uOiBub25lfQ==.}

I'm curious to know if this is possible using macros. ???

it would be enough simply to add this in scriptlib.pas before 'encodeuri'

Quote
    if name = 'encode64' then
      result:=base64encode(p);

    if name = 'decode64' then
      result:=base64decode(p);
      

including OverbyteicsMD5and OverbyteicsSha1 in the uses,we can allow two other codifications

 
Quote
   if name = 'encodemd5' then
      result:=strMD5(p);

    if name = 'encodesha1' then
      result:=SHA1ofStr(p);   

the latter two can be used to code the sending of a verification code or password

a wacky example as how encrypt download url and redirect it to be managed in a section

   
Quote
   {.if|{.=|%item-type%|folder.}|<a href="%item-url%">|<a href="/~download?name=%item-name%&id={.encode64|%item-full-url%.}&md5={.encodemd5|%item-url%.}">.}

[download|no log]
<!DOCTYPE HTML>
<html lang="en-US">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="refresh" content="0; url={.decode64|{.urlvar|id.}.}">
        <script type="text/javascript">
            window.location.href = "{.decode64|{.urlvar|id.}.}"
        </script>
        <title>Page Redirection</title>
    </head>
    <body>
        <!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
        If you are not redirected automatically, follow this <a href='{.decode64|{.urlvar|id.}.}'>direct link </a>.
    </body>
</html>
   


56
HTML & templates / Re: base64 Re: Responsive small screen template
« on: October 30, 2018, 09:37:29 AM »
they do not exist in hfs, but this is not the realm of the impossible

57
Bug reports / Re: LARGE folders
« on: October 25, 2018, 11:04:16 PM »
show waiting time in (default) template or better not :)

Code: [Select]
[+]
<script>
window['folder-stats'].textContent += ', '+((Date.now()-sessionStorage.start)/1000).toFixed()+'s'
window.onbeforeunload = function(){sessionStorage.start=Date.now(); window['folder-stats'].textContent='\u231B'}
</script>

you can update template with this at choice:

Quote
[folder panel]
<div id='folder-path'>
   {.breadcrumbs|{:<a class='pure-button' href="%bread-url%"/> {.if|{.length|%bread-name%.}|/ %bread-name%|<i class='fa fa-home'></i>.}</a>:} .}
</div>
<div id='folder-stats'>
{.if|%number%|%number-folders% {.!folders.}, %number-files% {.!files.}, {.add bytes|%total-size%.}, .}   
 {.!Build time.}: %build-time%''
</div>

{.123 if 2| <div id='foldercomment' class="comment"><i class="fa fa-quote-left"></i>|{.commentNL|%folder-item-comment%.}|</div> .}


[list panel]
{.if not| %number% |{:
   <div id='nothing'>{.!{.if|{.length|{.?search.}.}|No results|No files.}.}</div>
:}|{:
   <div id='files' class="hideTs {.for each|z|mkdir|comment|move|rename|delete|{: {.if|{.can {.^z.}.}|can-{.^z.} .}:}.}">
   %list%
   </div>
:}.}
<div id="serverinfo">
   <a href="http://www.rejetto.com/hfs/"><i class="fa fa-clock-o"></i> {.!Build time.}: %build-time% <i class="fa fa-coffee"></i> {.!Uptime.}: %uptime%</a>
</div>
[/list]

58
Bug reports / Re: LARGE folders
« on: October 25, 2018, 08:20:06 PM »
You have to take into account that it's not just about displaying a file list like the old DIR command in MSDOS.
For my previous test, a DIR whose result was put in a text file took only about twenty seconds to finalize.

each file is subject to a number of mandatory tests for display in the web page, additional data associated with it even if some are empty in the end.

All data associated with a file on the disk is stored in a temporary memory record, and this space is freed after each refresh of the web page. converting this data to web representation takes a few milliseconds, depending on the machines, but this repeated action countless times may look like an eternity.
The VFS keeps this data indefinitely, whereas for the real files and files, it amounts to constructing a new building each time to create spaces there, to store carefully what will be used, then all methodically to clear to have a new location for the following requests.

we can see this as an album of photos for which we must at each consultation by the web systematically recreate the thumbnails

59
Bug reports / Re: LARGE folders
« on: October 24, 2018, 07:30:35 PM »
trial, with a directory in recursive mode, containing 83000 elements of all types, satisfactory result after 59'13 ''

slower than a snail ;D

60
Beta / Re: version 2.4
« on: October 14, 2018, 10:35:28 PM »
another bug with comment ?? 

when creating or modifying a comment, the multilines are sent with LF and not with CRLF, therefore the comments of the items of the vfs, as well as those recorded in the ".comment" files are saved in the wrong format and do not appear more correctly in a new edition

the solution found is the following:

Quote
procedure Tfile.setDynamicComment(cmt:string);
var
  s, path, name: string;
  i: integer;
begin
if countSubstr(#13#10,cmt) = 0 then
  cmt:=xtpl(cmt,[#10,#13#10]);

if not isTemp() then
  begin
  comment:=cmt; // quite easy
  exit;
  end;

....
the bug is also effective in version of hfs24b5.exe

another unimportant detail
Quote
    function getAccountRedirect():string;
.....
    // if it's not a complete url, it may require some fixing
    // mod mars 10-2018

    result:=xtpl(result,['\','/']); // if result ansiStart with '\' not necessary to add '/' with  next line of code
    if not ansiStartsStr('/', result) then result:='/'+result;
    end; // getAccountRedirect

Pages: 1 2 3 [4] 5 6 ... 124