6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
10/19/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#7891] hook msglist_format
*
Your Email Address
*
Spam protection
Enter the letters below:
. .. .. ,. .. . |__||_/ \./ |_/ \ / | || \ | | \ \/
Comment
>> You are either not using IMP git, or you have not updated your > >> hooks.php file. > > > > I do use imp from horde-hatchery > > more horde/imp/docs/CHANGES > > -------- > > v5.0-git > > -------- > > > > [mms] Add ability to download attachments in MIMP (Request #2925). > > [mms] Revamp JS event handling model. > > [mms] ESC in DIMP search box now clears the search (Request #7196). > > [mms] Enhancements to status icon view (Request #7519) (DIMP). > > ... > > > > > > Here is the msglist_format hook (this is the only hook activated): > > > > if (!function_exists('_imp_hook_msglist_format')) { > > function _imp_hook_msglist_format($mbox, $uids, $mode) > > { > > try { > > $imap_res = $GLOBALS['imp_imap']->ob->fetch($mbox, array( > > Horde_Imap_Client::FETCH_HEADERS => > array(array('headers' => array('x-priority'), 'label' => > 'hdr_search', 'parse' => true, 'peek' => true)), > > Horde_Imap_Client::FETCH_STRUCTURE => array('parse' => true) > > ), array('ids' => array_values($uids))); > > } catch (Horde_Imap_Client_Exception $e) { > > return array(); > > } > > > > $alt_list = IMP_UI_Mailbox::getAttachmentAltList(); > > $imp_ui = new IMP_UI_Mailbox($mbox); > > $imp_msg_ui = new IMP_UI_Message(); > > $ret = array(); > > > > foreach ($uids as $uid) { > > $tmp = array(); > > $res_ptr = &$imap_res[$uid]; > > $tmp['status'] = ''; > > > > // Add attachment information > > if (($attachment = > $imp_ui->getAttachmentType($res_ptr['structure']->getType()))) { > > switch ($mode) { > > case 'imp': > > $alt_text = (isset($alt_list[$attachment])) > > ? $alt_list[$attachment] > > : $alt_list['attachment']; > > $tmp['status'] = Horde::img($attachment . '.png', > $alt_text, array('title' => $alt_text)); > > break; > > > > case 'dimp': > > $tmp['atc'] = $attachment; > > break; > > } > > } > > > > // Add X-Priority information > > switch > ($imp_msg_ui->getXpriority($res_ptr['headers']['hdr_search']->getValue('x-priority'))) > { > > case 'high': > > if ($mode == 'imp') { > > $tmp['flagbits'] = IMP::FLAG_FLAGGED; > > $tmp['status'] .= > Horde::img('mail_priority_high.png', _("High Priority"), > array('title' => _("High Priority"))); > > } > > $tmp['class'][] = 'important'; > > break; > > > > case 'low': > > if ($mode == 'imp') { > > $tmp['status'] .= > Horde::img('mail_priority_low.png', _("Low Priority"), array('title' > => _("Low Priority"))); > > } > > $tmp['class'][] = 'unimportant'; > > break; > > } > > > > if (!empty($tmp)) { > > $ret[$uid] = $tmp; > > } > > } > > > > return $ret; > > } > > }
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers