Ticket #1484859 (closed Patches: fixed)

Opened 7 months ago

Last modified 6 months ago

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

Changed 7 months ago by till

  • milestone changed from 0.1.1 to 0.1.5

Changed 7 months ago by maharaja

thanks for taking a look - i would consider this a bugfix thou :)

Changed 6 months ago by alec

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from 0.1.5 to 0.1.2

Fixed in r1330

Note: See TracTickets for help on using tickets.