diff --git a/authres_status.php b/authres_status.php index e8c7295..762840c 100755 --- a/authres_status.php +++ b/authres_status.php @@ -67,6 +67,7 @@ public function init() $this->add_hook('storage_init', array($this, 'storage_init')); $this->add_hook('messages_list', array($this, 'messages_list')); $this->add_hook('message_headers_output', array($this, 'message_headers')); + $this->add_hook('template_object_messagesummary', array($this, 'message_summary')); $dont_override = $rcmail->config->get('dont_override', array()); @@ -229,8 +230,7 @@ public function messages_list($p) return $p; } - public function message_headers($p) - { + private function populate_message_headers($p){ /* We only have to check the headers once and this method is executed more than once, /* so let's cache the result */ @@ -240,6 +240,10 @@ public function message_headers($p) $show_statuses = (int)rcmail::get_instance()->config->get('show_statuses'); $this->img_status = $this->get_authentication_status($p['headers'], $show_statuses, (int)$_GET["_uid"]); } + } + public function message_headers($p) + { + $this->populate_message_headers($p); $p['output']['from']['value'] = $this->img_status . $p['output']['from']['value']; $p['output']['from']['html'] = true; @@ -247,6 +251,11 @@ public function message_headers($p) return $p; } + public function message_summary($p){ + $this->populate_message_headers($GLOBALS['MESSAGE']); + return array('content' => preg_replace('/(\s*)()(From)/', '$1' . $this->img_status . ' $3', $p['content'])); + } + /* See https://tools.ietf.org/html/rfc5451 */ public function rfc5451_extract_authresheader($headers) diff --git a/localization/en_CA.inc b/localization/en_CA.inc index 3472967..0e9056f 100644 --- a/localization/en_CA.inc +++ b/localization/en_CA.inc @@ -12,7 +12,7 @@ $labels['invalidsignature'] = 'Signature is not valid! verified by '; $labels['for'] = 'for'; $labels['by'] = 'by'; -$labels['section_title'] = 'Authenticaton Status'; +$labels['section_title'] = 'Authentication Status'; $labels['column_title'] = 'Auth. Result'; $labels['title_enable_column'] = 'Enable Column'; diff --git a/localization/en_GB.inc b/localization/en_GB.inc index f0eea70..5660409 100644 --- a/localization/en_GB.inc +++ b/localization/en_GB.inc @@ -12,7 +12,7 @@ $labels['invalidsignature'] = 'Signature is not valid! verified by '; $labels['for'] = 'for'; $labels['by'] = 'by'; -$labels['section_title'] = 'Authenticaton Status'; +$labels['section_title'] = 'Authentication Status'; $labels['column_title'] = 'Auth. Result'; $labels['title_enable_column'] = 'Enable Column'; diff --git a/localization/en_NZ.inc b/localization/en_NZ.inc index 129ff0e..0221492 100644 --- a/localization/en_NZ.inc +++ b/localization/en_NZ.inc @@ -12,7 +12,7 @@ $labels['invalidsignature'] = 'Signature is not valid! verified by '; $labels['for'] = 'for'; $labels['by'] = 'by'; -$labels['section_title'] = 'Authenticaton Status'; +$labels['section_title'] = 'Authentication Status'; $labels['column_title'] = 'Auth. Result'; $labels['title_enable_column'] = 'Enable Column'; diff --git a/localization/en_US.inc b/localization/en_US.inc index 129ff0e..0221492 100755 --- a/localization/en_US.inc +++ b/localization/en_US.inc @@ -12,7 +12,7 @@ $labels['invalidsignature'] = 'Signature is not valid! verified by '; $labels['for'] = 'for'; $labels['by'] = 'by'; -$labels['section_title'] = 'Authenticaton Status'; +$labels['section_title'] = 'Authentication Status'; $labels['column_title'] = 'Auth. Result'; $labels['title_enable_column'] = 'Enable Column'; diff --git a/skins/elastic/authres_status.css b/skins/elastic/authres_status.css new file mode 100755 index 0000000..89a6fd1 --- /dev/null +++ b/skins/elastic/authres_status.css @@ -0,0 +1,36 @@ +.listing.iconized tr.authres_status>td.section:before { + content: url(badge.png); +} + +.webkit .messagelist tr > .authres_status +{ + width: 20px; +} + +.messagelist tr > .authres_status { + width: 20px; + padding: 2px 3px; + text-align: center; +} + +.messagelist tr > .authres_status span { + display: inline-block; + vertical-align: middle; + background: url(badge.png) center no-repeat; +} + +#sections-table tbody #rcmrowauthres_status td.section { + background-image: url(badge.png); + background-repeat: no-repeat; + background-position: 10px 5px; +} + +.authres-status-img { +} + +.widescreen .authres-status-img { + position: relative; + top: -1px; + height: 12px; + width: 12px; +} diff --git a/skins/elastic/badge.png b/skins/elastic/badge.png new file mode 100755 index 0000000..7cb95c5 Binary files /dev/null and b/skins/elastic/badge.png differ