[Tickets #9129] Global list of html_image_replacement

bugs at horde.org bugs at horde.org
Thu Jul 8 03:49:05 UTC 2010


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/9129
------------------------------------------------------------------------------
  Ticket             | 9129
  Created By         | leandro.damascena at gmail.com
  Summary            | Global list of html_image_replacement
  Queue              | IMP
  Version            | Git master
  Type               | Enhancement
  State              | New
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


leandro.damascena at gmail.com (2010-07-07 23:49) wrote:

Every time when a new user comes in my system I send a welcome email  
with remote images (like promotional emails). It generates a problem  
due to all the images are blocked and user needs to click in "Show  
images"... I think that IMP might be able to read a global conf file  
of "allow emails" to always display remote images... I know the user  
can do it using html_image_addrbook, but in my point of view this list  
is a good global alternative to sysadm

Following is a stupid example of implementation..

In the file: imp/lib/Mime/Viewer/Html.php (line 247)

$headersshowimage = $this->_params['contents']->getHeaderOb();
$fromshowimage = $headersshowimage->getValue('from');

if (!in_array($fromshowimage,$_GLOBAL['allowemails']))
{
if ($inline &&
             $GLOBALS['prefs']->getValue('html_image_replacement') &&
             preg_match($this->_img_regex, $this->_mimepart->getContents()) &&
             (!$GLOBALS['prefs']->getValue('html_image_addrbook') ||
              !$this->_inAddressBook())) {
             $data = preg_replace_callback($this->_img_regex,  
array($this, '_blockImages'), $data);

             $status[] = array(
                 'icon' => Horde::img('mime/image.png'),
                 'text' => array(
                     _("Images have been blocked to protect your privacy."),
                     Horde::link('#', '', 'unblockImageLink') .  
_("Show Images?") . '</a>'
                 )
             );
         }
}







More information about the bugs mailing list