rejetto forum

uploads and new folders

0 Members and 1 Guest are viewing this topic.

Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1297
  • ....... chut ! shh!
    • View Profile
For the beta buid #270 and its default template, this should/must be used in /home > Diff template tab:

Quote
[ajax.mkdir|no log]
{.break|if={.not|{.can mkdir.}.}|result={.!forbidden.}.}
{.set|x|{.force ansi|%folder%{.postvar|name.}.}.}
{.break|if={.exists|{.^x.}.}|result={.!exists.}.}
{.if|{.length|{.mkdir|{.^x.}.}.}|ok|{.!failed.}.}
{.add to log|%user% {.!has created this folder:.} {.^x.}.}

[ajax.rename|no log]
{.break|if={.not|{.can rename.}.}|result={.!forbidden.}.}
{.set|x|{.force ansi|%folder%{.postvar|from.}.}.}
{.set|y|{.force ansi|%folder%{.postvar|to.}.}.}
{.break|if={.not|{.exists|{.^x.}.}.}|result={.!not found.}.}
{.break|if={.exists|{.^y.}.}|result={.!exists.}.}
{.if|{.length|{.rename|{.^x.}|{.^y.}.}.}|ok|{.!failed.}.}
{.add to log|%user% {.!has renamed an item:.} {.^x.} --> {.^y.}.}

[ajax.move|no log]
{.set|dst|{.force ansi|{.postvar|dst.}.}.}
{.break|if={.not|{.and|{.get|can delete.}|{.get|can upload|path={.^dst.}.}/and.}.} |result={.!forbidden.}.}
{.for each|fn|{.replace|:|{.no pipe||.}|{.postvar|files.}.}|{:
    {.set|x|{.force ansi|%folder%{.^fn.}.}.}
    {.set|y|{.^dst.}/{.^fn.}.}
    {.if not |{.exists|{.^x.}.}|{.^x.}{.!:.} {.!not found.}|{:
        {.if|{.exists|{.^y.}.}|{.^y.}{.!:.} {.!already exists.}|{:
         {.if not|{.length|{.move|{.^x.}|{.^y.}.}.}|{.^fn.}{.!:.} {.!not moved.}.}
           {.add to log|%user% {.!has moved an item:.} {.^x.} --> {.^y.}.}
        :}.}
    :}.}
    ;
:}.}
« Last Edit: September 16, 2010, 07:37:44 AM by SilentPliz »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13260
    • View Profile

Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1297
  • ....... chut ! shh!
    • View Profile