rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: kaler on September 03, 2009, 06:18:57 PM

Title: add folder (but not to the %folder-resorce%
Post by: kaler on September 03, 2009, 06:18:57 PM
I would add a folder (with a macro) in a folder
when i would do this i must use {.mkdir|NAME.}
In the window of HFS i have the folder USER

When sombody reigstred in my site, then should be make a folder into the folder user. i tried it several times, but i don't know how to add a folder, when the directory isn't the same folder.

Please help me.
Title: Re: add folder (but not to the %folder-resorce%
Post by: kaler on September 04, 2009, 12:32:50 PM
perhaps i must explain it better...

Every user should have his own folder where he can upload files. but only when he pressed the button yes or a link...

i know how i add a folder, when you are in the same folder, but how can i add a folder in an other resurce
 I have an example:
Code: [Select]
[special:begin]
{.add folder|real|user.}
{.set item|/user|hide=1.}
{.set item|/user|no log=1.}
[]
<html>
<a href="javascript:void(0)" onklick="{.mkdir|/user/%user%/.}
</html>
is this possible or not?
Title: Re: add folder (but not to the %folder-resorce%
Post by: Mars on September 04, 2009, 12:43:28 PM
[special:begin]
{.add folder|real|xx:\fullpath\user|user|overwrite=0.}     <--this line is important as is , else folder is deleted every time -->
{.set item|/user|hide=1.}
{.set item|/user|no log=1.}



<a href="javascript:void(0)" onklick="{.mkdir|/user/%user%/.}     is right
Title: Re: add folder (but not to the %folder-resorce%
Post by: kaler on September 04, 2009, 12:56:19 PM
Quote
{.add folder|real|xx:\fullpath\user|user|overwrite=0.}     <--this line is important as is , else folder is deleted every time -->

This line i don't understand realy... (sry)
the fullpath is not the path on the pc or? this is the path of hfs...

Title: Re: add folder (but not to the %folder-resorce%
Post by: rejetto on September 04, 2009, 02:27:23 PM
no, you can't do
onclick="{.mkdir|/user/%user%/.}"


onclick is just for javascript.
if you need to do just that after the click, than you have to pass the command to the server, and the server should read the request, and make it.

a simple way is this

<a href='?pleaseMakeDir=1'>make it!</a>

{.if|{.?pleaseMakeDir.}|{:
   {.mkdir| etc etc etc .}
:}.}




since you are working so much on these things, my suggestion is, if you didn't already do it, to use option Menu > debug > enable macros.log
the file will be created near hfs.exe
and you can see how the commands are executed, to solve problems
Title: Re: add folder (but not to the %folder-resorce%
Post by: kaler on September 04, 2009, 02:50:06 PM
ok thanks...


i have change the onklick already...

my main question is:

here my example filesystem:

-HOME
  |-template
  |-user
    |-user1
    |-user2 <--This folder i will create-->
  |-my template.tpl

so when i am in the template.... can i make the user2 into the folder user?
and when yes: How?
ps: please only with the relation HOME (not the fullpath on your drive)
Title: Re: add folder (but not to the %folder-resorce%
Post by: rejetto on September 04, 2009, 03:38:19 PM
it doesn't work with current version.
it will with in the next one.
Title: Re: add folder (but not to the %folder-resorce%
Post by: kaler on September 06, 2009, 04:14:09 PM
Code: [Select]
{.if|%user%|{:

{.mkdir|%folder-resource%\%user%.}

{.add folder|real|%folder-resource%\%user%|/Accounts/%user%.}
{.set item|/Accounts/%user%|add access=%user%.}
{.set item|/Accounts/%user%|add access=admin.}
{.set item|/Accounts/%user%|add delete=%user%.}
{.set item|/Accounts/%user%|add delete=admin.}
{.set item|/Accounts/%user%|add upload=%user%.}
{.set item|/Accounts/%user%|add upload=admin.}:}.}

I use the newset build 246 but it dont works... (why)

last day it works perfectly but now i don know...

The folder is created correctly, but not added to the already existing virtual folder.
Title: Re: add folder (but not to the %folder-resorce%
Post by: kaler on September 10, 2009, 05:47:22 PM
why it don't works???
Title: Re: add folder (but not to the %folder-resorce%
Post by: rejetto on September 13, 2009, 12:36:30 PM
enable macros.log as i said
then try to create the folder.
if it doesn't work, look at macros.log
if you don't understand the problem, the post macros.log here