Thread:Project:Support desk/Passing to an extension

I'm trying to write a simple extension. I want to pass it the name of an uploaded media file but I can't seem to get it to the extension. Specifically, I don't want to have to put the path to the file in the call, I'd like to just put and have the location found for me. I've stripped the extension down to just a few lines: setHook( 'Henry', 'henryrender' ); return true; } function henryrender($input, $args) { global $wgScriptPath; return "File: ".$args['file']." " ; } ?>

Then, in a page, I put the following (where GH-Scouts.mp4 is a previously uploaded video):



Filepath:

This returns the following:

File:

Filepath: http://www.mysite.com/images/a/ad/GH-Scouts.mp4

As you can see, the second line correctly displays the full path to the file but the first, which calls the extension, reports the file path as it was entered. I feel like I need to have my henryinit associated with a different hook but can't figure out which one. If, for instance, I use 'ParserBeforeTidy' it finds the path, but then it doesn't run my extension. Can someone point me to an example or discussion of how I can do this? Thanks.