Author Topic: how can i create a new folder?  (Read 1783 times)

0 Members and 1 Guest are viewing this topic.

Offline funjay

  • Occasional poster
  • *
  • Posts: 21
    • View Profile
how can i create a new folder?
« 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.}
« Last Edit: July 21, 2009, 05:33:07 AM by funjay »

Offline TSG

  • Operator
  • Tireless poster
  • *****
  • Posts: 1934
    • View Profile
    • RAWR-Designs
Re: how can i create a new folder?
« Reply #1 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

Offline funjay

  • Occasional poster
  • *
  • Posts: 21
    • View Profile
Re: how can i create a new folder?
« Reply #2 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?


Offline luca69

  • Occasional poster
  • *
  • Posts: 95
    • View Profile
Re: how can i create a new folder?
« Reply #3 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.
Life is what happens to you while you are busy making other plans

Offline funjay

  • Occasional poster
  • *
  • Posts: 21
    • View Profile
Re: how can i create a new folder?
« Reply #4 on: July 22, 2009, 12:45:15 AM »
thanks for you help. and i will try it. thanks again......

Offline funjay

  • Occasional poster
  • *
  • Posts: 21
    • View Profile
Re: how can i create a new folder?
« Reply #5 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.....

Offline funjay

  • Occasional poster
  • *
  • Posts: 21
    • View Profile
Re: how can i create a new folder?
« Reply #6 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.

Offline luca69

  • Occasional poster
  • *
  • Posts: 95
    • View Profile
Re: how can i create a new folder?
« Reply #7 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  ;)
Life is what happens to you while you are busy making other plans

Online rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 13008
    • View Profile
Re: how can i create a new folder?
« Reply #8 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".