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 ... 120
1
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

2
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.

3
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?

4
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() || ''


5
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


6
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.

7
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

8
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







9
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

10
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

11
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"







12
Beta / Re: version 2.4
« on: September 21, 2018, 10:04:05 PM »
tests done in firefox on windows

There is an forgetting in the template, is missing a passage in the following line concerning links, to see image



by removing this line the default disappears
.item-link { float:left; }


There is a problem with the selection tool, when we check a box, it performs the same action as clicking on the name






13
Thank you DJ for the idea, my previous post edited accordingly regarding the javascript part ,works as simply as necessary ;)

I'm still working on the changes that can be made to the default template with a minimum of modifications and that are as simple as possible

probably it will not work on platforms where javascript is disabled,  I do not know if it also has an impact on jquery

14
Quote
[+file]
<td>%item-size%B<td><script type="text/javascript" >mdy(%item-modified-dt%)</script><td>%item-dl-count%

[+folder]
<td class='nosize'>{.!folder-item|folder.}<td><script type="text/javascript" >mdy(%item-modified-dt%) </script><td>%item-dl-count%

Quote
[lib.js|no log]
// <script> // this is here for the syntax highlighter


function mdy(data) {
   var options={ year: '2-digit', month: '2-digit', day: 'numeric' }
   var locales=navigator.language;
   document.write( new Date((data*24-613658)*3600*1000).toLocaleString(locales, options));
}


function outsideV(e, additionalMargin) {
......

Pages: [1] 2 3 ... 120