rejetto forum
Software => HFS ~ HTTP File Server => Beta => Topic started by: simbadda 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?
-
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)
-
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!
-
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. :-\
-
works fine here too.
try posting your Menu > debug > show customized options
-
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.}.}
-
you are very effective SP :D
-
Isn't it ! :D
-
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
-
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.
-
Awesome. Thanks for all of your work on this rejetto!
-
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
-
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.
[+request]
{.set|z|%folder%{.postvar|fldname.}.}.}
{.add to log|%user% {.!added this folder:.} {.^z.}.}
.}
I use
[special:begin]
{.if|{.and|{.get|can delete.}|{.postvar|createfolder.}.}|{: {.mkdir|%folder-resource%\{.postvar|fldname.}.}
:}/if.}
And in tpl main section
<form>
Folder name: <input type='text' name='fldname'><input type='submit' name='createfolder' value='Add Folder'>
</form>
Logging user created folder is my need.
-
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.
:)
-
@ SilentPliz
I had tried with [special:begin] but I was over complicating it, as usual.
Works perfectly ;D
Many thanks
-
For the beta buid #270 and its default template, this should/must be used in /home > Diff template tab:
[ajax.mkdir|no log]
{.break|if={.not|{.can mkdir.}.}|result={.!forbidden.}.}
{.set|x|{.force ansi|%folder%{.postvar|name.}.}.}
{.break|if={.exists|{.^x.}.}|result={.!exists.}.}
{.if|{.length|{.mkdir|{.^x.}.}.}|ok|{.!failed.}.}
{.add to log|%user% {.!has created this folder:.} {.^x.}.}
[ajax.rename|no log]
{.break|if={.not|{.can rename.}.}|result={.!forbidden.}.}
{.set|x|{.force ansi|%folder%{.postvar|from.}.}.}
{.set|y|{.force ansi|%folder%{.postvar|to.}.}.}
{.break|if={.not|{.exists|{.^x.}.}.}|result={.!not found.}.}
{.break|if={.exists|{.^y.}.}|result={.!exists.}.}
{.if|{.length|{.rename|{.^x.}|{.^y.}.}.}|ok|{.!failed.}.}
{.add to log|%user% {.!has renamed an item:.} {.^x.} --> {.^y.}.}
[ajax.move|no log]
{.set|dst|{.force ansi|{.postvar|dst.}.}.}
{.break|if={.not|{.and|{.get|can delete.}|{.get|can upload|path={.^dst.}.}/and.}.} |result={.!forbidden.}.}
{.for each|fn|{.replace|:|{.no pipe||.}|{.postvar|files.}.}|{:
{.set|x|{.force ansi|%folder%{.^fn.}.}.}
{.set|y|{.^dst.}/{.^fn.}.}
{.if not |{.exists|{.^x.}.}|{.^x.}{.!:.} {.!not found.}|{:
{.if|{.exists|{.^y.}.}|{.^y.}{.!:.} {.!already exists.}|{:
{.if not|{.length|{.move|{.^x.}|{.^y.}.}.}|{.^fn.}{.!:.} {.!not moved.}.}
{.add to log|%user% {.!has moved an item:.} {.^x.} --> {.^y.}.}
:}.}
:}.}
;
:}.}
-
i will include it in the default tpl
-
Thank you very much! ;)
I could forget this topic. :D