Author Topic: uploads and new folders  (Read 7718 times)

0 Members and 1 Guest are viewing this topic.

Offline simbadda

  • Occasional poster
  • *
  • Posts: 9
    • View Profile
uploads and new folders
« on: July 30, 2010, 01:04:45 AM »
Thanks for your great software.

I have a few questions. I am new here so sorry if these are already covered elsewhere.  I did a little searching but didn't find anything on these.

First, the log does not seem to be logging uploads even though "Uploads" is checked.  Is this a known issue?

Second, is there a way to tell the software to log the creation of folders?

Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
  • Posts: 1240
  • ....... chut ! shh!
    • View Profile
uploads and new folders
« Reply #1 on: July 30, 2010, 02:25:16 AM »
Welcome simbadda !  :)


First, the log does not seem to be logging uploads even though "Uploads" is checked.  Is this a known issue?

It work fine for me.

Try/verify:

right click in the log box -> Log what -> check Uploads

Second, is there a way to tell the software to log the creation of folders?

Right click on the Home/ root of the VFS box -> Properties... -> add in the Diff template tab:

[ajax.mkdir|no log]
{.if|{.can mkdir.}|{:
   {.set|x|{.force ansi|%folder%{.postvar|name.}.}.}
   {.if|{.exists|{.^x.}.}|{.!exists.}|{:
      {.if|{.length|{.mkdir|{.^x.}.}.}|ok|{.!failed.}.}
     {.add to log|%user% {.!has created this folder:.} {.^x.}.}
   :}.}
:}|{.!forbidden.}.}

 
! This only works with the default template of HFS beta above.

Edit: message updated for compatibility with latest beta (266)
« Last Edit: August 10, 2010, 03:00:14 AM by SilentPliz »

Offline simbadda

  • Occasional poster
  • *
  • Posts: 9
    • View Profile
uploads and new folders
« Reply #2 on: July 30, 2010, 05:17:10 AM »
Hello SP, thanks for the welcome!

right click in the log box -> Log what -> check Uploads

This option is checked but the log does not change when something is uploaded.  I have tried this on two different computers.

Right click on the Home/ root of the VFS box -> Properties... -> add in the Diff template tab:

This worked.  Thanks!

Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
  • Posts: 1240
  • ....... chut ! shh!
    • View Profile
uploads and new folders
« Reply #3 on: July 30, 2010, 07:22:24 AM »
This option is checked but the log does not change when something is uploaded.  I have tried this on two different computers.

I have no idea what this could be, sorry. :-\
« Last Edit: July 30, 2010, 08:06:15 AM by SilentPliz »

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12953
    • View Profile
Re: uploads and new folders
« Reply #4 on: July 30, 2010, 02:04:20 PM »
works fine here too.
try posting your Menu > debug > show customized options

Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
  • Posts: 1240
  • ....... chut ! shh!
    • View Profile
Re: uploads and new folders
« Reply #5 on: July 31, 2010, 05:50:17 PM »
Second, is there a way to tell the software to log the creation of folders?

For the latest beta (266) you should use this corrected section in the Diff template tab.

[ajax.mkdir|no log]
{.if|{.can mkdir.}|{:
   {.set|x|{.force ansi|%folder%{.postvar|name.}.}.}
   {.if|{.exists|{.^x.}.}|{.!exists.}|{:
      {.if|{.length|{.mkdir|{.^x.}.}.}|ok|{.!failed.}.}
     {.add to log|%user% {.!has created this folder:.} {.^x.}.}
   :}.}
:}|{.!forbidden.}.}
« Last Edit: August 10, 2010, 03:00:33 AM by SilentPliz »

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12953
    • View Profile
Re: uploads and new folders
« Reply #6 on: August 01, 2010, 12:44:15 PM »
you are very effective SP :D

Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
  • Posts: 1240
  • ....... chut ! shh!
    • View Profile
Re: uploads and new folders
« Reply #7 on: August 01, 2010, 01:01:30 PM »

Isn't it !  :D

Offline simbadda

  • Occasional poster
  • *
  • Posts: 9
    • View Profile
Re: uploads and new folders
« Reply #8 on: August 02, 2010, 12:34:42 AM »
Here is my output for Menu->Debug->Show customized options.  By the way, I noticed that entries get created in this list when options are changed to the non-default setting.  However, when I uncheck "Uploads", no entry is created (e.g. "log-uploads").

window-max=yes
# default: no

easy=no
# default: yes

port=8080
# default:

log-file-name=.\Log\HFSlog%y%-%m%.txt
# default:

log-date=yes
# default: no

log-only-served=no
# default: yes

log-server-start=yes
# default: no

log-server-stop=yes
# default: no

log-browsing=no
# default: yes

tpl-file=hfs.tpl
# default:

confirm-exit=yes
# default: no

search-better-ip=no
# default: yes

start-minimized=yes
# default: no

delete-partial-uploads=yes
# default: no

default-sorting=
# default: name

last-dialog-folder=C:\Software\HFS\Internet
# default: C:\HFS

last-update-check=40389.3519287037
# default: 0

last-file-open=C:\HFS\Config.vfs
# default:

mime-types=*.js|text/javascript|*.htm;*.html|text/html|*.jpg;*.jpeg;*.jpe|image/jpeg|*.gif|image/gif|*.png|image/png|*.bmp|image/bmp|*.ico|image/x-icon|*.mpeg;*.mpg;*.mpe|video/mpeg|*.avi|video/x-msvideo|*.txt|text/plain|*.css|text/css
# default: *.htm;*.html|text/html|*.jpg;*.jpeg;*.jpe|image/jpeg|*.gif|image/gif|*.png|image/png|*.bmp|image/bmp|*.ico|image/x-icon|*.mpeg;*.mpg;*.mpe|video/mpeg|*.avi|video/x-msvideo|*.txt|text/plain|*.css|text/css|*.js|text/javascript

recent-files=C:\HFS\Config.vfs
# default:

trusted-files=C:\HFS\Config.vfs
# default:

number-files-on-upload=no
# default: yes

out-total=59366341
# default: 0

in-total=54115303
# default: 0

hits-total=6724
# default: 0

downloads-total=9
# default: 0

upload-total=8
# default: 0

connections-columns=IP address;206|File;206|Status;180|Speed;60|Time left;55|Progress;50|
# default: IP address;206|File;206|Status;206|Speed;50|Time left;50|Progress;50|

auto-comment=yes
# default: no

update-daily=no
# default: yes

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12953
    • View Profile
Re: uploads and new folders
« Reply #9 on: August 03, 2010, 11:44:00 AM »
Here is my output for Menu->Debug->Show customized options.  By the way, I noticed that entries get created in this list when options are changed to the non-default setting.  However, when I uncheck "Uploads", no entry is created (e.g. "log-uploads").

indeed, there'a a bug. That option is neither saved, and you lose the setting at every restart. Fixed in next release (265).

Thanks to the customized options you posted i got to reproduced the bug. It's likely to be fixed for the next release, I'm working on it right now.
In the while you may workaround it by enabling the "browsing" in the log menu.

Offline simbadda

  • Occasional poster
  • *
  • Posts: 9
    • View Profile
Re: uploads and new folders
« Reply #10 on: August 03, 2010, 11:16:04 PM »
Awesome.  Thanks for all of your work on this rejetto!

Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
  • Posts: 1240
  • ....... chut ! shh!
    • View Profile
Re: uploads and new folders
« Reply #11 on: August 10, 2010, 02:57:14 AM »
For the latest beta (266) you should use this corrected section in the Diff template tab.

[ajax.mkdir|no log]
{.if|{.can mkdir.}|{:
   {.set|x|{.force ansi|%folder%{.postvar|name.}.}.}
   {.if|{.exists|{.^x.}.}|{.!exists.}|{:
      {.if|{.length|{.mkdir|{.^x.}.}.}|ok|{.!failed.}.}
     {.add to log|%user% {.!has created this folder:.} {.^x.}.}
   :}.}
:}|{.!forbidden.}.}

Hopefully this will be also valid for the next beta ... but I dare not assert. :D
« Last Edit: August 10, 2010, 03:01:02 AM by SilentPliz »

Offline r][m

  • Tireless poster
  • ****
  • Posts: 347
    • View Profile
Re: uploads and new folders
« Reply #12 on: August 23, 2010, 04:57:19 PM »
For the latest beta (266) you should use this corrected section in the Diff template tab.

[ajax.mkdir|no log]
{.if|{.can mkdir.}|{:
   {.set|x|{.force ansi|%folder%{.postvar|name.}.}.}
   {.if|{.exists|{.^x.}.}|{.!exists.}|{:
      {.if|{.length|{.mkdir|{.^x.}.}.}|ok|{.!failed.}.}
     {.add to log|%user% {.!has created this folder:.} {.^x.}.}
   :}.}
:}|{.!forbidden.}.}

Hopefully this will be also valid for the next beta ... but I dare not assert. :D
@ SilentPliz
Is there a way to make this work without ajax? I'd like to use this in my tpl, or in events.
Tried code below in events, but it doesn't work.
Code: [Select]
[+request]
{.set|z|%folder%{.postvar|fldname.}.}.}
{.add to log|%user% {.!added this folder:.} {.^z.}.}
.}
I use
Code: [Select]
[special:begin]
{.if|{.and|{.get|can delete.}|{.postvar|createfolder.}.}|{: {.mkdir|%folder-resource%\{.postvar|fldname.}.}
 :}/if.}
And in tpl main section
Code: [Select]
<form>
Folder name: <input type='text' name='fldname'><input type='submit' name='createfolder' value='Add Folder'>
</form>
Logging user created folder is my need.
« Last Edit: August 23, 2010, 05:24:58 PM by r][m »

Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
  • Posts: 1240
  • ....... chut ! shh!
    • View Profile
Re: uploads and new folders
« Reply #13 on: August 23, 2010, 07:02:17 PM »
Hi r][m !  ;)

Try this:
Add the blue line in the code that you already have in your template.

[special:begin]
{.if|{.and|{.get|can delete.}|{.postvar|createfolder.}.}|{: {.mkdir|%folder-resource%\{.postvar|fldname.}.}
{.add to log|%user% added this folder: %folder%{.postvar|fldname.}.}
 :}/if.}

Replace %folder% by %folder-resource%\ if you want see Windows paths, rather than Web based paths.

Remove %folder% if you want only see the folder name displayed in the log.

 :)

Offline r][m

  • Tireless poster
  • ****
  • Posts: 347
    • View Profile
Re: uploads and new folders
« Reply #14 on: August 24, 2010, 05:01:32 AM »
@ SilentPliz
I had tried with [special:begin] but I was over complicating it, as usual.
Works perfectly  ;D
Many thanks