rejetto forum
Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: Mars on June 02, 2009, 11:15:10 PM
-
there is nothing to remove those flags:
if cmd = 'hide' then
include(f.flags, FA_HIDDEN);
if cmd = 'hide tree' then
include(f.flags, FA_HIDDENTREE);
if cmd = 'no log' then
include(f.flags, FA_DONT_LOG);
if cmd = 'not as download' then
if f.isFile() then include(f.flags, FA_DONT_COUNT_AS_DL)
and with the last 'if' when 'not f.isfile' , has a link a download mask?
else f.dontCountAsDownloadMask:=first(par(2), '*');
if cmd = 'hide' then
include(f.flags, FA_HIDDEN);
if cmd = 'hide tree' and f.isfolder() then
include(f.flags, FA_HIDDENTREE);
if cmd = 'no log' then
include(f.flags, FA_DONT_LOG);
if cmd = 'not as download' then
if not f.isFolder() then include(f.flags, FA_DONT_COUNT_AS_DL)
why not have the possibility to use all commands in a one line? cmd:=par(1);
{.set item|%item%|hide=[0,1]|hide tree=[0,1]|no log=[0,1]|not as download=[0,1,mask]|access=liste|delete=liste|upload=liste| ..... .}
0= reset flag , 1= set flag
not as download=[0,1,mask]
0=remove this flag (files) or reset the download mask (folders)
1=set this flag (files)
mask= set the download mask (folders)
one way for the three first flags?
try if isTrue(parEx('hide')) then include(f.flags, FA_HIDDEN)
else exclude(f.flags, FA_HIDDEN);
except end;
if f.isfolder then
try if isTrue(parEx('hide tree')) then include(f.flags, FA_HIDDENTREE)
else exclude(f.flags, FA_HIDDENTREE);
except end;
try if isTrue(parEx('no log')) then include(f.flags, FA_DONT_LOG)
else exclude(f.flags, FA_DONT_LOG);
except end;
-
at the time there was no "named parameters" feature.
thanks for suggesting, time to update. ;)
-
translation from Topic (Italiano) : + new {.set item.} (http://www.rejetto.com/forum/index.php?topic=7064.0)
To understand, with this new {.set item.} should you/he/she be all right as I write under for not making the download of the contained fileses in the briefcase "video?" I have tried in this way and it seems that you work, if possible confirm me the thing and if you/he/she will be maintained {.set item.} in this way, I must modify the Template because with the old way it tells me that the macros are deprecate. Hi, French. ;)
[special:import]
{.add folder|real|..}
{.set item|/video|hide=1.}
{.set item|/video|no log=1.}
{.set item|/video|not as download=*.}
yes, it seems ok but you can so more synthetically write also
{.set item|/video|hide=1.|no log=1.|not as download=*.}
You also to me OK seems and works, does he/she know me that I must modify the Template, you have also thought for resolving the problem that the briefcase is not adjourned if the virtual file system contains a precedent briefcase of peer name?