Closed (won't fix)
Project:
Drupal core
Version:
6.x-dev
Component:
forms system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Aug 2009 at 20:40 UTC
Updated:
10 Oct 2011 at 12:22 UTC
theme_image_button() in form.inc prepends base_path() to the image src, meaning that only local images can be rendered in an image_button.
D7 does it right: theme_image_button() calls file_create_url() which handles both internal and external URIs -- by checking whether :// exists in the URI with file_uri_scheme().
There is no file_uri_scheme() in D6. What's the best way to get external image support into a form's image_button in D6?
...Add the URI scheme checking code to theme_image_button()?
...Add file_uri_scheme() to D6?
Comments
Comment #1
jeffschulerOr, (ahem)...
One could just override
theme_image_button()by adding
THEMENAME_image_button()totemplate.php:Comment #2
beautifulmindThank you jeffschuler for sharing the code.
Regards.