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.
Hey,
I was wondering if you could patch in the ability to easily add icons for external paths.
Currently to achieve this I add a line to your module which simply removes ":" from the filename so I can have an external link to say "http://www.google.com/analytics" with the image "http__www.google.com_analytics_.png" in my images folder.
$file_name = $image_directory . '/' . str_replace('/', '_', $working_path) . '.png';
to
$file_name = $image_directory . '/' . str_replace('/', '_', $working_path) . '.png';
$file_name = str_replace(':', '', $file_name);
If there is a better way to achieve this please tell me.
Thanks
Comments
Comment #1
ailgm CreditAttribution: ailgm commentedI'd find that useful too. In my case, I have a link to another Drupal site that doesn't have clean urls, so the link is of the format:
http://www.othersite.com/index.php?q=pagename
Is the question mark also handled properly?
Right now I'm just overriding the control_panel_default.png, but that wouldn't work with two, and obviously isn't the right way to do it.
Comment #2
Lawrence CreditAttribution: Lawrence commentedGreat feature, and for reference, it works with subdomains. Here's an example. Took me a half hour to figure this out, silly as it may be.
I'd like to see this integrated with Control Panel if possible, otherwise I'll keep this great bit of code in it with each update. Thanks jfraser.