6.0.0-alpha14
7/2/25

[#9129] Global list of html_image_replacement
Summary Global list of html_image_replacement
Queue IMP
Queue Version Git master
Type Enhancement
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester leandro.damascena (at) gmail (dot) com
Created 07/08/2010 (5473 days ago)
Due
Updated 07/09/2010 (5472 days ago)
Assigned
Resolved 07/09/2010 (5472 days ago)
Milestone
Patch No

History
07/09/2010 06:05:14 AM leandro (dot) damascena (at) gmail (dot) com Comment #4 Reply to this comment
Implemented via a mime_drivers.php parameter.
Thank you man... I will update horde next week and try.
07/09/2010 05:54:12 AM Michael Slusarz Comment #3
Assigned to Michael Slusarz
State ⇒ Resolved
Reply to this comment
Implemented via a mime_drivers.php parameter.
07/08/2010 03:49:05 AM leandro (dot) damascena (at) gmail (dot) com Comment #1
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Global list of html_image_replacement
Type ⇒ Enhancement
State ⇒ New
Reply to this comment
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>'
                 )
             );
         }
}

Saved Queries