The filter module URL Icon appends the respective favicon to an external link. This is very helpful in link lists (e.g. reference lists or similar). It uses drupal_http_request() and stores favicons locally which decreases loading times for known sites. The code is in function _urlicon_format_favicon().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SoftballUtah.com’s picture

How to I add my company's favicon to my URL

semplice’s picture

You can achieve this effect using 4 lines of JavaScript as outlined in this blog post: Highlight external links with favicons

jcfiala’s picture

Status: Active » Postponed (maintainer needs more info)

But... what is it this ticket wants me to do? Okay, a module exists that will add favicons to links - that's good, I guess.

Roi Danton’s picture

E.g. add a new formatter which uses drupal_http_request() to retrieve the favicon of the linked site and displays the favicon next to the link.

However this request is so old, I have no more usage for it and so no time to provide a patch. Maybe the approach posted in #2 helps though the approach posted in initial post doesn't rely on external pages, so it don't depends on their links and their caches. I leave the issue status as is, you might want to close it.

jcfiala’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I'm not convinced this is something the link module needs to do, so I'm going to close it for now. If we suddenly come up with a lot of demand for it, we can revisit it.

jhedstrom’s picture

Status: Closed (fixed) » Needs review
FileSize
3.13 KB
4.89 KB

After seeing how Google automatically adds these, I stumbled across this issue. Here is a simple patch that adds an additional formatter, and uses the idea from #2 to automatically grab each url's favicon, and displays it next to the link.

bertboerland’s picture

ha, 9 years ago http://drupal.org/node/632 ;-)

dqd’s picture

Version: 6.x-2.x-dev » 6.x-2.6-beta3
Assigned: dqd » Unassigned

@jhedstrom: thanks for the patch. can U please provide a patch for latest dev of D6 and D7 ? I would love to commit that to the final 7.x-1.0 release.

@bertboerland: jesus!

dqd’s picture

Version: 6.x-2.6-beta3 » 6.x-2.x-dev
Assigned: Unassigned » dqd
2pha’s picture

Version: 6.x-2.6-beta3 » 7.x-1.x-dev
Assigned: Unassigned » dqd

I have created a module for the D7 version of link and it is now in line in the 'project applications'.
https://drupal.org/node/1760298

I would like to hear from the maintainers of the link module as to whether they would like for me to provide a patch for the link module or if they think the module I have already made should be a full project.
I would like some feedback from a maintainer within about a week, but if there is no feedback I will just push for the favicon module to be a full project.
Thanks.

If anyone needs the feature now, the link to the sandbox is: https://drupal.org/sandbox/2pha/1760094

2pha’s picture

The module I described above is now a full project.
https://drupal.org/project/link_favicon_formatter

jcfiala’s picture

Status: Needs review » Closed (won't fix)

Okay! So, now that there's a new project that does this, we don't need this as an extension to link anymore, as far as I can see.

I'm going to close this, and add the module to the list of extensions/useful modules on the project page.