First of all I want to state that I really like this module!
I am using the module for a yellow papers kind of guide. Each company is entered as a link from this module. I use a view to display the companies per category (taxonomy term). To display the hyperlink to the company I use the view field "Links: Link title". The hyperlink is displayed correctly. However, when someone clicks on the hyperlink, the click is not counted. This is a pitty since the link module does have a facility for this. In stead of http://www.example.com the hyperlink displayed in the view should be something like http://www.mywebsite.nl/links/goto/211/35/links_weblink. I managed to change this in the source code. I had to hack the file links_view.inc for this which I don't like.
I made the following changes. Inside file links_view.inc inside function "links_handler_field_url" I replaced the
OLD CODE
return l($title, $data->link_title_url);
with the
NEW CODE
$link = links_get_link($data->link_title_url);
$lid = is_array($link) ? intval($link['lid']) : 0;
$nid = $data->nid;
$url = links_format_goto_url($nid, $lid,'links_weblink');
$target = links_get_goto_target();
$attribs = empty($target) ? array() : array('target'=>links_get_goto_target());
return l($title,$url,$attribs);
I "stole" the code from links_weblinks.module and links.inc.
My question is: is this the best way to go to get the clicks counted? Are there other ways to make the clicks counted? Is there a reason why the clicks are not counted in the current version of this module?
If this is the way to go I will submit a feature request.