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 ... 123
31
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

32
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]

33
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

34
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

35
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

36
Bug reports / Re: LARGE folders
« on: October 13, 2018, 05:17:54 PM »
certainly we can impose a limit on the number of files that will be displayed but whatever the filtering of the names used, the complete analysis of the physical support is still necessary, and only the elements that will correspond to the filter mask will be retained.

37
Beta / Re: version 2.4
« on: October 07, 2018, 09:38:10 PM »
Are you sure you are using the default template with no customization.
Do other people have problems?


Sorry, i was using the new template of  24b3 as external template new 24b4

yes, you can find a function explicitly adding the bytes, escapeIon()

that's what I understood but too late


EDIT:
@rejetto
do you think you can make a drop-down menu for the "more options" button instead of a central popup, as in the following image?


EDIT: hfs24b4 with internal template
I am again confronted with a reported problem: check boxes checked have the same effect as clicking the name of the associated item

EDIT:
a really strange thing, with the last exe in two different directories, on one the upload progress works but not the other, I realized that in the one that works I had a default.tpl while in the other I did not have it, I ended up comparing the default.tps of the first with the internal hfs.tpl of the second one, and I realized that réjetto had made a dumpling (fluff, stupidity)

by changing "upload-panel" by "upload panel" he had thus transformed $('#upload-panel') into $('#upload panel') leaving <div id="upload-panel"

EDIT:
@rejetto
do you think you can make a drop-down menu for the "more options" button instead of a central popup, as in the following image?

38
Beta / Re: version 2.4
« on: October 07, 2018, 05:54:09 PM »
     {.set item|{.force ansi|%folder%{.^fn.}.}|comment={.force ansi|{.postvar|text.}.}.}

not working:   the tag <BR> always appears when editing the comment

however, what I proposed works despite everything

var value = it.find('.comment-text').text() || ''


39
Beta / Re: version 2.4
« on: October 06, 2018, 07:21:22 PM »
Quote
when used multilines in comments, lines are serapated wit '\n'  (that is correct), but when editing
comment with web page \n are converted as <br> and appear on screen

same bug  in previous versions,  the offender is discovered, it is necessary to correct the setcomment function of the template

        function setComment() {
            var value = it.find('.comment-text').html() || ''    // change .html() by .text()
            ask(this.innerHTML, {type:'textarea', value}, s=>
                s===value || ajax('comment', { text:s, files:name }))
        }//setComment

Quote
test.txt=there is a &quot;bug&quot;\nwith comments\ntext is saved as\nhtml code \nas with &quot;htmlencode&quot; function
failing to do better: , this patch provides a temporary solution

procedure Tfile.setDynamicComment(cmt:string);
var
  s, path, name: string;
  i: integer;
begin
//as a possible function htmlDecode(s:string):string
cmt:=xtpl(cmt,[
      '&amp;', '&',
      '&lt;', '<',
      '&gt;', '>',
      '&quot;','"',
      '&#039;',''''
      ]);

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

although in reality the previous conversion is not necessary, there is the problem of the codification of the languages of certain languages and their restitution.

an example is better than all explanations

how to define  comments in Russian characters, store them, and restore them correctly to the web page

this comment как возможная функция saved as %EF%B7%90%D0%BA%D0%B0%D0%BA %D0%B2%D0%BE%D0%B7%D0%BC%D0%BE%D0%B6%D0%BD%D0%B0%D1%8F %D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D1%8F%EF%B7%AF in comments file

the question is how to force the creation of comment files in UTF8 and not in ANSI by default


40
Beta / Re: version 2.4
« on: October 06, 2018, 04:29:50 PM »
@rejetto

discovery new bug with comment  hfs 2.3 and 2.4 are same

comments in hfs.comment.txt or descript.ion  seem saved trough "htmlEconde" function

    case s of
      '&': p:='&amp;';
      '<': p:='&lt;';
      '>': p:='&gt;';
      '"': p:='&quot;';
      '''': p:='&#039;';
      else p:=s;
      end;

test.txt=there is a &quot;bug&quot;\nwith comments\ntext is saved as\nhtml code \nas with &quot;htmlencode&quot; function



when used multilines in comments, lines are serapated wit '\n'  (that is correct), but when editing
comment with web page \n are converted as <br> and appear on screen

when comments are saved in descript.ion, each line of comment is ended with code 0x04,0xC,x0D,x0A

Quote
Here, I mean that the descript.ion file contains a backslash and a letter 'n' where I typed a line break, and two special characters 04 C2 at the end of the comment. In addition, the line is ended by a Windows line break 0D 0A.

Apparently, the two extra characters at the end of the line signal the end of a multiline comment. If I remove them, the comment is rendered as a single line in the GUI, and the '\n' sequences are displayed literally.

41
Beta / Re: version 2.4
« on: October 06, 2018, 03:50:13 PM »
with just 10KB (4 when gzipped)

women often say that it is not the size that is the most important, but the quality of the "work" and the pleasure it gives  ;D

can you load the demo version that I put and test the addition of userCFG and see result in hfs.ini  ;)

user data can be defined with SET INI and GET INI for use in a template, and managed from the options dialog (F7 last tab)

these data can be used as persistent variables between two hfs launches

42
Beta / Re: version 2.4
« on: October 06, 2018, 01:56:23 PM »
I do not know what to answer, for now with hfs 2.4 and the template of 2.3, i can not check some files but COMMENT button does not work

maybe,  am I in special conditions?

I confirm, the good functioning depends on the version jquery in resource

 I updated data.rc  as it

Quote
1 24 "WindowsXP.manifest"
defaultTpl TEXT default.tpl
copyright TEXT copyright.txt
dmBrowserTpl TEXT dmBrowser.tpl
invertban TEXT invertban.txt
filelistTpl TEXT filelist.tpl
uploadDisabled TEXT upload_disabled.txt
uploadHowTo TEXT upload_how.txt
alias TEXT alias.txt
shell GIF shell.gif
IPservices TEXT ipservices.txt
jquery TEXT jquery.min.js
jquery2 TEXT jquery2.min.js

added in main.pas

Quote
  if data.urlvars.values['mode'] = 'jquery2' then
    begin
    replyWithString(getRes('jquery2'));
    conn.reply.contentType:='text/javascript';
    exit;
    end;

in the new template

Quote
[]
{.$common-head.}
   <title>{.!HFS.} %folder%</title>
    <script type="text/javascript" src="/?mode=jquery2"></script>
   <style class='trash-me'>
   .onlyscript, button[onclick] { display:none; }
   </style>

I put in the directory of exe two tpls named hfs23.tpl and hfs24.tpl corresponding to the versions to be tested, which allows from the menu to quickly change used template and refreh the web page

working perfectly, and the compatibility with the old templates remains whole ;D

use this link to load a demo version







43
Beta / Re: version 2.4
« on: October 06, 2018, 01:36:27 PM »
why not consider having both versions of jquery.min.js in the exe as resources and somehow make a detection of the new template related to hfs 2.4 and utlser the most appropriate jquery to keep a compatibility


  if data.urlvars.values['mode'] = 'jquery' then
    begin
    if tplversion<'T4' then replyWithString(getRes('jquery'))
         else replyWithString(getRes('jquery2'));

    conn.reply.contentType:='text/javascript';
    exit;
    end;

it would be possible to add a specific instruction in the new templates in order to allow the differentiation of jquery to use

44
Beta / Re: version 2.4
« on: October 06, 2018, 10:24:31 AM »
in all likelihood, this would come from an incompatibility of versions of javascript used as a resource by hfs: 1.4.2 in v2.3m, 1.12.x in v2.4

45
Beta / Re: version 2.4
« on: October 05, 2018, 01:24:13 PM »
Quote
bug report about comments.
recurring problem since very old versions
the management of the comments is delicate because it involves 3 different types of storage
- "menu > VFS > Load single comment file"
- "menu > VFS > Support DESCRIPT.ION"
- hfs.comments file

the last template still contains an old usage of adding comments instead of using the appropriate macros
{.if| {.length|%user%.} |{: {.append| %folder-resource%\hfs.comments.txt |{.filename|%item-resource%.}=uploaded by %user%
/append.} :}/if.}


the correct formula would be preferably the following because it automatically manages the storage of information:
{.if| {.length|%user%.} |{: {.set  item| %item-name% |comment={.filename|%item-resource%.}=uploaded by %user%
/set.} :}/if.}



Quote
- Possible bug found #1 & #2

that's another concern I've reported to rejetto recently,

several solutions are possible, but in the immediate future the safest solution is not to allow such actions on a VFS element

remotely modify the vfs may conflict with the option "Save options >> Autosave Options"







Pages: 1 2 [3] 4 5 ... 123