There's a few add-on tutorials around, specifically the ones by Lawrence. You need to use xen:link with your own router directories so XenForo knows what it's looking for.
You also need to pass the information from the code to fill in the $params variable so then it can be used by the template, and more importantly the link can be created for your action.
You also need to pass the information from the code to fill in the $params variable so then it can be used by the template, and more importantly the link can be created for your action.