Line 200 is OK, no need to be changed.
Here are the modifications from the begining:
weblinks/templates/weblinks_header.html
<script language="javascript">
function weblinks_hardlink(link,lid){
link.href='<{$module_url}>/visit.php?lid=' + lid;
return true;
}
script>
This code is to be added on the first line of the file
weblinks/templates/weblinks_link.html (about line 6) and
weblinks/templates/weblinks_linklist.html (about line 6)
replace
<a href="<{$module_url}>/visit.php?lid=<{$link.lid}>" target="_blank">
with
<a href="<{$link.url}>" onmousedown="return weblinks_hardlink(this,<{$link.lid}>)" target="_blank">
templates/weblinks_link.html (about line 186)
The code should look like this:
<{if $link.flag_url == 1}>
<a href="<{$link.url}>" onmousedown="return weblinks_hardlink(this,<{$link.lid}>)" target="_blank">
<{/if}>
templates/weblinks_linklist.html (about line 67)
The code should look like this:
<{if $link.flag_url == 1}>
<a href="<{$link.url}>" onmousedown="return weblinks_hardlink(this,<{$link.lid}>)" target="_blank">
<{/if}>
In fact I added a javascript function that will dynamically (on the fly) change a hardlink into a redirection link.
Now in every templates file, I'm looking for a link to visit.php (this is the file that do the redirection). And I
change this link into the real hardlink and add a call to the javascript function. Thus when a guy click on the hardlink,
the browser first call the javascript function that change the hardlink into redir, and then the browser load the changed URL.
My own php and templates files of weblinks have been changed a lot of time to suit my needs for my website. I cannot post them all.
If you need, send me a mail with your weblinks_header.html, weblinks_link.html and weblink_linklist.html to support at goloom d0t com