rejetto forum

add folder (but not to the %folder-resorce%

kaler · 10 · 5780

0 Members and 1 Guest are viewing this topic.

Offline kaler

  • Occasional poster
  • *
    • Posts: 94
    • View Profile
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
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: 2059
    • View Profile
[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
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: 13510
    • View Profile
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
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: 13510
    • View Profile
it doesn't work with current version.
it will with in the next one.


Offline kaler

  • Occasional poster
  • *
    • Posts: 94
    • View Profile
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 rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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