Hey Rejetto, why does this hfs.events script not work? I'm trying to make a script that generates thumbnails when a user uploads them. On uploading a picture, HFS launches the program, but something wrong happens with the parameters, because the program doesn't do what it's supposed to. I know that the parameters are right for the program because they work just fine when using them in a shortcut to the program without having HFS launch it. So obviously, something is wrong that's making HFS not give it the right parameters, but I don't know why.
[upload completed]
{.if| {.or| {.=|%item-ext%|jpg.} | {.=|%item-ext%|png.} .} |
{.set|parameter1|"{.vfs to disk|%item-url%.}".}
{.set|parameter2|{.chr|47.}D="D:\%user%\thumbnails\".}
{.exec|C:\Program Files\Easy Thumbnails\EzThumbs.exe| {.call|parameter1.} {.call|parameter2.} .}
.}
Parameter 1 could look like
"D:\user\test.jpg"
and Parameter 2 would then look like
/D="D:\user\thumbnails\"
Parameter 1 is supposed to tell the program the source file and parameter 2 tells it the output.
I know that the scripting that creates the correct parameters themselves works because I had it input the result into the log with {.add to log.} and it was correct.
http://www.fookes.com/ezthumbs/Thanks for your endless help
,
Ray
BTW, not that it's relevant because this part works but to show the thumbnails, I put this in the template.
[file=folder=link|private]
<tr class='{.if|{.mod|{.count|row.}|2.}|even|odd.}' >
<td>
<input type='checkbox' class='selector' name='box' value='%item-url%' {.if not|{.or|{.get|can delete.}|{.get|can access.}|{.get|can archive item.}.}|disabled='disabled'.} />
{.if not|{.get|can access.}|<img src='/~img_lock'>.}
<a class="the-item" href="%item-url%" >
<img src="%item-icon%" alt="" />
%item-name%</a>
[color=blue]{.if| {.or| {.=|%item-ext%|jpg.} | {.=|%item-ext%|png.} .} |
<div style="float:right;">
<a href="%item-url%" class="thumblink" >
<img src="/.%user%/thumbnails/thumbnail.%item-name%" alt="" />
</a>
</div>
.}[/color]