Ticket #1484859 (closed Patches: fixed)
patch roundcube skin-engine to allow absolute urls as image location
| Reported by: | maharaja | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.2-alpha |
| Component: | Client Scripts | Version: | 0.1-stable |
| Severity: | normal | Keywords: | |
| Cc: |
Description
i tried to use https://somehost/logo.png in the roundcube templates, but roundcube always appended the skin path.
the patch below looks for the "://" combination found in a url and skips the skin_path accordingly.
--- include/rcmail_template.inc.old 2008-03-07 10:48:39.377078000 +0100
+++ include/rcmail_template.inc 2008-03-07 10:49:59.474083750 +0100
@@ -691,7 +691,11 @@ class rcmail_template extends rcube_html
{
$attrib_str = create_attrib_string($attrib, array('style', 'class', 'id', 'width', 'height', 'border', 'hspace', 'vspace', 'align', 'alt'));
$img_tag = sprintf('<img src="%%s"%s />', $attrib_str);
- $btn_content = sprintf($img_tag, $skin_path.$attrib['image']);
+ // skip skin_path if we found some http://somehost/image.png image url
+ if ( strpos( $attrib['image'], '://' ) == FALSE ) {
+ $btn_content = sprintf($img_tag, $skin_path.$attrib['image']);
+ } else {
+ $btn_content = sprintf($img_tag, $attrib['image']);
+ }
if ($attrib['label'])
$btn_content .= ' '.$attrib['label'];
Change History
Note: See
TracTickets for help on using
tickets.
