rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: funjay on July 21, 2009, 05:24:06 AM

Title: how can i create a new folder?
Post by: funjay on July 21, 2009, 05:24:06 AM
Hi all, i am new, how i can create a new folder with upload rights?
i found these codes via searching, where should i add these codes? thanks.
Code: [Select]
 {.if|{.get|can upload.}|
Folder name: <input  type='text' name='fldname' maxlength="25" size="25" >
<input  type='submit' name='createfolder' value='Create Folder' >
  /if.}


[special:begin]
{.if|{.and| {.get|can upload.} | {.postvar|createfolder.} .}|{:
{.mkdir|%folder-resource%\{.postvar|fldname.}.}
:}/if.}
Title: Re: how can i create a new folder?
Post by: TSG on July 21, 2009, 08:00:25 AM
The post right below yours has discussion about this:

http://www.rejetto.com/forum/index.php?topic=6570.0
Title: Re: how can i create a new folder?
Post by: funjay on July 21, 2009, 08:30:10 AM
Thanks for the hint. and the main problem is i do not know where to put these codes?

Title: Re: how can i create a new folder?
Post by: luca69 on July 21, 2009, 12:38:04 PM
You have to edit the template and you need to be a little bit familiar with html coding.

The first part of the code
  {.if|{.get|can upload.}|
   Folder name: <input  type='text' name='fldname' maxlength="25" size="25" >
   <input  type='submit' name='createfolder' value='Create Folder' >
  /if.}


You have to put in the first form.
Look for the tag <form method='post' id='filelist'> and place the above code just before the closing tag </form>

Pleace the second peace of code at the end of the template file.
Title: Re: how can i create a new folder?
Post by: funjay on July 22, 2009, 12:45:15 AM
thanks for you help. and i will try it. thanks again......
Title: Re: how can i create a new folder?
Post by: funjay on July 23, 2009, 02:55:44 AM
it works, and i add the following code in the bottom
Code: [Select]
{.if|{.and| {.get|can upload.} | {.postvar|createfolder.} .}|{:
{.mkdir|%folder-resource%\{.postvar|fldname.}.}
<script language="JavaScript" type="text/javascript"> window.location="/"; </script>
:}/if.}

the previous codes didn't make the deletion function work.....
Title: Re: how can i create a new folder?
Post by: funjay on July 23, 2009, 03:03:19 AM
what does the code "<script language="JavaScript" type="text/javascript"> window.location="/"; </script>"
mean? it seems work without this code. thanks.
Title: Re: how can i create a new folder?
Post by: luca69 on July 23, 2009, 01:02:07 PM
what does the code "<script language="JavaScript" type="text/javascript"> window.location="/"; </script>"
mean? it seems work without this code. thanks.

No idea: i do not have it in my template and it works fine  ;)
Title: Re: how can i create a new folder?
Post by: rejetto on August 13, 2009, 12:53:31 PM
what does the code "<script language="JavaScript" type="text/javascript"> window.location="/"; </script>"
mean?

it means "go to the home folder".