CCK Link + Gotwo url redirection?

diegogers - November 21, 2006 - 20:39

Hi, is it possible in some way to automatically make a link in a cck link field to transform into a Go link?

What I need is to count each click on the link.

Thanks.

Found it

diegogers - November 22, 2006 - 04:27

I used the gotwo_get_url($url) function in the theme template.

Gotwo module

faunapolis - September 17, 2007 - 14:16

How do you implement this function in the theme template?

Thank you

http://www.faunapolis.org/

CCK extras has Link Redirect

faunapolis - December 23, 2007 - 10:51

This might be promising for this purpose, I will try it in a near future:

http://drupal.org/project/cck_extras

http://www.faunapolis.org/

I used following code in field-[FIELD-NAME].tpl.php - DRUPAL 5.x

pedroz - August 7, 2009 - 06:58

<?php
// remove 'http://' if it's already in the url
$item['url'] = str_replace("http://","",$item['url']);
// output actual gotwo link
echo "<a href=\"".gotwo_get_url('http://'.$item['url'])."\">".$item['title']."</a>";
?>

 
 

Drupal is a registered trademark of Dries Buytaert.