URLIcon module feature add

duozersk - March 14, 2009 - 23:30
Project:External Links
Version:6.x-1.7
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

Hi to the great Lullabot team! ;)

The URLIcon module has similar feature realized through the Input filter (only for external links, no functionality for mailto: links).

Basically, this URLIcon module has less options to set in the administration section (only 3 radio-buttons in the filter setup, no regexp to tune), but it has got the choice of what icon to add to external links - either the favicon of the external link target (falls back to the default icon if no favicon detected) or always use the default "external link" icon (similar to the one External Links has). It stores the favicon icons in the /default/files/urlicon directory. Plus a css class to use for theming.

Just wondering if you could get this option of favicons added to this module (like an option to choose). Not sure if pure jQuery javascript can handle the favicons download and check if it already has been downloaded... Hope this helps to get the idea on how to extend this module. See the screen-shots (the second one shows what you get if you have both modules enabled).

AttachmentSize
urlicon.PNG6.26 KB
test.PNG2.12 KB

#1

duozersk - March 15, 2009 - 00:05

Just for the record: we should think on the way to handle this favicon functionality... may be this is not needed to save favicons on the file system - just try to get them from the remote target and if fails - use the default icon.

#2

quicksketch - March 15, 2009 - 03:42

It seems like adding remote icons could cause some serious slowdowns since the user's browser would need to open an HTTP connection at every external site. The URLIcon module seems to take a sane approach to this and downloads the favicon locally so the extra connections aren't required from the external sites.

I'm not entirely sure this is possible in an efficient manner purely with JavaScript. The URLIcon module has the advantage of having PHP at its disposal, which knows whether or not files exist on the server or if a FavIcon could not be retrieved. External Links doesn't have any knowledge of what links are on the page until the page is loaded, so there's no way for Drupal to pass it information about which sites it already has FavIcons for.

So generally, I'm thinking this isn't practical for External Links, but if you get any clever ideas let me know.

#3

quicksketch - May 16, 2009 - 21:40
Status:active» won't fix

I'm marking wont' fix, because I don't think this is possible in a purely JavaScript implementation (which is what this module does). If needing this functionality, the URLIcon is probably a better solution and you should contact the author (via the issue queue) to add any needed features to that module.

 
 

Drupal is a registered trademark of Dries Buytaert.