Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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().
Comment | File | Size | Author |
---|---|---|---|
#6 | link-favicon.png | 4.89 KB | jhedstrom |
#6 | link-535948-06-favicon-formatter.patch | 3.13 KB | jhedstrom |
Comments
Comment #1
SoftballUtah.com CreditAttribution: SoftballUtah.com commentedHow to I add my company's favicon to my URL
Comment #2
semplice CreditAttribution: semplice commentedYou can achieve this effect using 4 lines of JavaScript as outlined in this blog post: Highlight external links with favicons
Comment #3
jcfiala CreditAttribution: jcfiala commentedBut... what is it this ticket wants me to do? Okay, a module exists that will add favicons to links - that's good, I guess.
Comment #4
Roi Danton CreditAttribution: Roi Danton commentedE.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.
Comment #5
jcfiala CreditAttribution: jcfiala commentedI'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.
Comment #6
jhedstromAfter 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.
Comment #7
bertboerland CreditAttribution: bertboerland commentedha, 9 years ago http://drupal.org/node/632 ;-)
Comment #8
dqd@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!
Comment #9
dqdComment #10
2phaI 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
Comment #11
2phaThe module I described above is now a full project.
https://drupal.org/project/link_favicon_formatter
Comment #12
jcfiala CreditAttribution: jcfiala commentedOkay! 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.