Since there were many different issues asking for Digg like behaviour for link module and I honestly fully understand the wish to have that options at hand (since it is obviuos from the name of the module), but being much aware of all the con's on that (because I already build a Digg like site with Drupal and link module modified), and since this is actually rather more a custom field module for content type building than a linking system module, I think we should collect all the askings and discussion about that in one issue.

There are many things to discuss and it all flooded the issue queue. Especailly I am not sure about if this is more a content type rather than a option /addition to link module we talk about here. Let's face some pro's and con's here, and if this should be inbuild link or be provided by an additional module. I also would like to ask some "old hands" of drupal masters to join the discussion since there also some security and performance points with it in here.

I start this new issue and would like to ask you all to collect/provide your Digg (or similar) depending whishes for 6.x and 7.x with details and how-to's here. Describe exactly what you would like to have in and how you would start to do it. Any snippets and patches should be made after discussions. Please don't start with a patch and ask for implementation until it has been discussed to keep a better overview. I will post links in here from all issues I close now to lead them here.


Rameez’s picture

It would be great if we get the different module for it, because link module has its own Role.

I doubt if Pathauto can be implemented to do it, coz pathauto aliases the original internal URL. This is something which will store internal aliases for external URLs. However i'm unaware of what security issues can come in this.

Desperately waiting to see some initiative on this.

Rameez’s picture

just came across Bouncer module :

not exact same as we discussing here, but giving some close concept.

diqidoq’s picture

good point Riaz! thanks a lot. I think I should set up a link in the project page to point more attention here ...

Rameez’s picture

Hi again! first it's sad to see that people giving no attention here, coz i thought it's something many people will like to see as drupal module.

I would like you to see this : Drupal Affiliate Link cloaking/redirection module

This allows to add external links with internal path via admin panel, we need it in cck, where path should be generated automatically with some token value or counter. Thanks for your kind attention to this matter.

Rameez’s picture

I achieved a good alternative with ShortURL + custom formatters + Link cck module.

However it doesn't allows the prefix tokens in path, limitations with statics and admin UI with paths created.

diqidoq’s picture

Title:General issue / discussion about link module handling Digg like options / behaviour» Gathered: options and tools to create Digg like site with link module

thanks for reporting back Riaz!

Do you asked me to look on implementable code from for our approach?

Your alternative with ShortURL + custom formatters + Link cck module sounds good. I am friend of achieving tasks with more than one module instead of repeating code everywhere. But could you provide more details how you extactly did that for followers, and some more pro's and con's ?

Thanks for the effort

Rameez’s picture

Here is the clean explanation: integrate ShortURL with link field in cck

But it's creates paths like this (Where ghgjdh is path created by shorturl)
There is no prefix feature in shorturl and no admin interface to look-up paths created.


diqidoq’s picture

Ok, but the links you provide show off something what could definitely be better implemented all together in link module, since a Digg like tool isn't such a big deal in these days no more. Many social networks have that already implemented for each user. Even the status post stream of facebook acts like a whole Digg site if you think about it twice. That's why sites like Digg will fade away more and more next years, because they have only that one feature to support which is too less to have another user account to service. Users look for all in one solutions now. Even browsers who support bookmarking with notes and comments and previews can't get the users no more. In the eyes of a user, It's a small feature, that's why it should be surrounded by other features. And that's why it should no involve three modules and code modifications. I vote for a go completely into link module!

Rameez’s picture

Completely agree with you Digidog. And you said really true facts. I also vote for this functionality to implement into link module itself.

diqidoq’s picture

@ all

So lets set up a @TODO ...

1.) Implementing #535948: Add favicon next to external links
2.) Implementing this or something similar, as mentioned by Riaz
3.) Checking this for any revision or any chance to create anything similar but free? (website screenshot)
4.) Implementing functions to count clicks or links per user or other stats

Complete or correct me if I am wrong. And then ... start providing code since I can't do this all alone.

By the way ... check my bookmarks subpage which is realized with standart link module and own custom content type "link" in D7

Ken Hawkins’s picture

Titles of links could be automatically set on the node forms in near real-time using ajax that calls a php function using this setup

(via Stackoverflow)

php file get_external_content.php:

function file_get_contents_curl($url){
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    data = curl_exec($ch);
    return $data;

$url = $_REQUEST["url"];
$html = file_get_contents_curl($url);

$title = $matches[1];

echo  json_encode(array("url" => $url, "title" => $title));

then in javascript:

function getTitle(externalUrl){
  var proxyurl = "http://localhost/get_external_content.php?url=" + externalUrl;
    url: proxyurl,
    async: true,
    success: function(response) {
    error: function(e) {
      alert("error! " + e);

Then just assign the javascript function to fire after a url is pasted into the link field.