rejetto forum

Testing build #243

rejetto · 14 · 9726

0 Members and 1 Guest are viewing this topic.

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
download @ www.dovedove.it/hfs/hfs243.exe

what's new
+ {.set|mode=XXX.}
+ new event [on macro rename] [link]
* {.add folder.} will now replace any existing folder with same name
- after searching for files, archive was not applying to results (again!) [link]
- archiving and deletion was not working for file with "+" in the name [link]


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
   
Hi!  :)

About:

"{.add folder.} will now replace any existing folder with same name"

Just a request for clarification.
I have a question, perhaps a little stupid:  :-\

Why replace a folder if it already exists?
« Last Edit: August 18, 2009, 12:49:40 AM by SilentPliz »



Offline SilentPliz

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

Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
Quote
"{.add folder.} will now replace any existing folder with same name"
???
Why to destroy systematically an existing directory while it would be enough only to add the parameter overwrite=true to the macro.  

Quote
[special:import]
{.add folder|real|template|overwrite=true.}
{.set item|/template|hide=1.}
{.set item|/template|no log=1.}
{.dialog|
Thank you for choosing the RAWR-Template!

Remember to check for updates and visit us at:
http://www.RAWR-Designs.com
.}

Otherwise when the folder exists already then the action is simply cancelled
Quote
{.if|{.add folder|real|template.}
    |New folder created successfully
    |The directory already exists or was not able to be created
./if}

A use under this shape would be much more conventional
« Last Edit: August 20, 2009, 09:31:35 PM by Mars »


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
Hi!  :)

Bug in the Web page when the folder name ends with an exclamation point (!).

« Last Edit: August 22, 2009, 10:14:20 PM by SilentPliz »


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
Quote
<body>
<table width='100%'>
<tr>
  <td width='95%'>
    <div id='folderlabel'>{.!folder.}</div>
    <div id='folder'>{.breadcrumbs|{:<a href="%bread-url%">{.if|{.%bread-name%=.}|{.!Home.}|%bread-name%.}/</a>:} .}</div>
{.if| %user% |
  <td nowrap>
    <div class='button'><img src="/~img27"> {.!user.}: %user%</div>
/if.}

change inside all templates the red text to blue text  ;)

Quote
<body>
<table width='100%'>
<tr>
  <td width='95%'>
    <div id='folderlabel'>{.!folder.}</div>
    <div id='folder'>{.breadcrumbs|{:<a href="%bread-url%">{.or|%bread-name%|{.!Home.}.}</a>/:} .}</div>
{.if| %user% |
  <td nowrap>
    <div class='button'><img src="/~img27"> {.!user.}: %user%</div>
/if.}

when a bread-name is ended with ! , {.if|{.%bread-name%=.}| .}| is evaluate as {.if|{.%bread-name%!=.}|


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
Quote
"{.add folder.} will now replace any existing folder with same name"
Why to destroy systematically an existing directory while it would be enough only to add the parameter overwrite=true to the macro. 

good point.
i will add the overwrite parameter in next build, but i will keep the "true" as default value, being it the most convenient for the people (according to the posts i read).


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
when a bread-name is ended with ! , {.if|{.%bread-name%=.}| .}| is evaluate as {.if|{.%bread-name%!=.}|

haha, that's a sad part of the language being so "dynamic" :D
i adopted your solution, since i like the "or" a lot,
just let it be known that the problem could be solved by putting extra spaces
{.%bread-name% = .}
or by using the conventional syntax
{.=|%bread-name%|.}


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
According to any rigour, the root should have been named  / at the place of an empty string with %bread-name%   :D
and tested as this
{:<a href="%bread-url%">{.if|{./=%bread-name%.}|{.!Home.}|%bread-name%.}/</a>:}    ;)

hehe!
« Last Edit: August 25, 2009, 01:38:46 PM by Mars »


Offline Caco

  • Tireless poster
  • ****
    • Posts: 113
    • View Profile
Quote
+ new event [on macro rename]

I'm trying to use this event to rename the preview file each time a file is renamed:

[+on macro rename]
{.rename "%folder-resource%\[previews]\%old-item-name%.flv"|"%folder-resource%\[previews]\%item-name%.flv.}

The problem is that %old-item-name% does not exist :D

And i also fear that this could lead to a chain reaction.

Any idea?

If i had that old item name variable , i could pass it to a simple batch file using

{.exec cmd.exe preview_rename.bat %old-item-name% %item-name%.} instead of using {.rename.}


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
Quote
[+on macro rename]
{.rename "%folder-resource%\[previews]\%old-item-name%.flv"|"%folder-resource%\[previews]\%item-name%.flv.}

you can't use a macro rename inside the event [+on macro rename] because this event is called when the macro rename is launched. ;)



Offline Caco

  • Tireless poster
  • ****
    • Posts: 113
    • View Profile
I imagined that. Then i need to pass old name to a batch file, but i don't know how to do it  ;D


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
you are right caco, next version will include these changes

+ new symbols %old-name% and %new-name% for event [on macro rename]
+ running a {.rename.} during [on macro rename] won't fire the event again (but you can override this with parameter "recursive")

;)