I started this conversation earlier in this thread.

At the time I was trying to make the links produced by link directory into "direct" links instead of via showthread.php like they do now. Originally this was because I was having issues with using multiple domains but Brian posted a fix and I abandoned this because it didn't seem necessary anymore.

Fast forward to today though... I realized that an affiliate program I have been using for months has been incompatible with the links produced by Links Directory. For months I have been building up a directory of over 100 affiliates but only realized today none were being properly credited. This is because it's a javascript file which intercepts outbound links and attaches the appropriate affiliate code- but this JavaScript runs in the vBulletin footer... when showlink.php was taking over the link it was effectively bypassing the affiliation code.

The only solution this time was to change all my Links Directory links to "direct" links rather than via showlink.php. I hope in some future version this might be an option we can enable or disable from the control panel, but for now several template edits are necessary.

I'm posting this here because affiliate programs like this are becoming more popular and I don't want other admins to make the same mistake I did and assume all links are working correctly.

Basically if you look at an "external" link in Links Directory, even though the URL on the page might show up as http://www.dell.com, the <a href="..."> link code is actually something like:
Code:
http://www.juot.net/forums/links/showlink.php?do=goto&l=268&linkurl=http://www.dell.com
Where the showlink.php file then forwards the user to the requested site. Brian confirmed this was necessary only for Liks Directory to count how many "views" each site collects, so if you go to "Direct" links your "Views" will no longer be updated. I opted to edit the templates to display "N/A" for views so people don't see low numbers and get concerned no one is viewing a site.

Anyway the template edits are fairly straightforward. You need to edit the following 3 templates:

  • adv_links_linkbit
  • ADV_LINKS_SHOWLINK
  • adv_links_linkbit_dropdowns


In each template find the <a href="..."> tags, specifically the ones with
Code:
showlink.php?$session[sessionurl]do=goto&amp;l=$link[linkid]&amp;linkurl=$link[linkurl]
in them... then remove everything else from between the quotes and leave ONLY
Code:
$link[linkurl]
That will make your links into direct links and allow them to be affiliated properly.