Author Topic: add folder (but not to the %folder-resorce%  (Read 2469 times)

0 Members and 1 Guest are viewing this topic.

Offline kaler

  • Occasional poster
  • *
  • Posts: 94
    • View Profile
add folder (but not to the %folder-resorce%
« 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.

Offline kaler

  • Occasional poster
  • *
  • Posts: 94
    • View Profile
Re: add folder (but not to the %folder-resorce%
« Reply #1 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?

Offline Mars

  • Operator
  • Tireless poster
  • *****
  • Posts: 1882
    • View Profile
Re: add folder (but not to the %folder-resorce%
« Reply #2 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

Offline kaler

  • Occasional poster
  • *
  • Posts: 94
    • View Profile
Re: add folder (but not to the %folder-resorce%
« Reply #3 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...


Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12949
    • View Profile
Re: add folder (but not to the %folder-resorce%
« Reply #4 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

Offline kaler

  • Occasional poster
  • *
  • Posts: 94
    • View Profile
Re: add folder (but not to the %folder-resorce%
« Reply #5 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)

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12949
    • View Profile
Re: add folder (but not to the %folder-resorce%
« Reply #6 on: September 04, 2009, 03:38:19 PM »
it doesn't work with current version.
it will with in the next one.

Offline kaler

  • Occasional poster
  • *
  • Posts: 94
    • View Profile
Re: add folder (but not to the %folder-resorce%
« Reply #7 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.

Offline kaler

  • Occasional poster
  • *
  • Posts: 94
    • View Profile
Re: add folder (but not to the %folder-resorce%
« Reply #8 on: September 10, 2009, 05:47:22 PM »
why it don't works???

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12949
    • View Profile
Re: add folder (but not to the %folder-resorce%
« Reply #9 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