rejetto forum

how can i create a new folder?

funjay · 9 · 1902

0 Members and 1 Guest are viewing this topic.

Offline funjay

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

  • Occasional poster
  • *
    • Posts: 21
    • View Profile
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
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
thanks for you help. and i will try it. thanks again......


Offline funjay

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


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13308
    • View Profile
what does the code "<script language="JavaScript" type="text/javascript"> window.location="/"; </script>"
mean?

it means "go to the home folder".