JulianD, what are the proper functions to build links?
If you have your url route on a string variable, building a link is as simple as this:
PHP:
XenForo_Link::buildPublicLink("account/privaty");
Or if you'd like to use the route's built in function to build a link, the syntax is usually as follows:
PHP:
XenForo_Link::buildPublicLink('members', $user);
XenForo_Link::buildPublicLink('posts', $post);
XenForo_Link::buildPublicLink('threads', $thread);
The first parameter is the route prefix that should be used, the second parameter is an array containing the required variables to build a link related to the route you're using. If you take a look at the thread route prefix (library/XenForo/Route/Prefix/Threads.php, there's a function called buildLink(). By calling XenForo_Link::buildPublicLink('threads', $thread), you are effectively calling the buildLink function within the Threads route.
XenForo uses some standardized url structure that you may be already familiar with. The format is somewhat like this:
site.com/[prefix]/[action]
But in cases where a parameter is required, such in this thread url, where the thread_id is needed, XenForo supports another commonly used url structure:
site.com/[prefix]/[param]/[action]
If we take this thread url as an example, the above variables would be:
prefix: threads
param: _get-in-the-url.58145
action: empty (default action, which usually means "index")
Anyway, you can even create your own routes with very complex url structures if you ever need to, completely outside of what XenForo already uses. You just need to code the proper route functions to support your url structures