Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for elastic skin #36

Closed
wants to merge 1 commit into from

Conversation

ScottPeterJohnson
Copy link

Tentative fix for #26, adds support for the Elastic skin.

@photoninger
Copy link
Contributor

photoninger commented Nov 29, 2019

This patch works only for english users, I changed the regex to be less specific and moved the img between "from" and the address:
return array('content' => preg_replace('/(<span>.*)(<span class="adr">)/', '$1' . $this->img_status . ' $2 ', $p['content']));

And it also works with $this->populate_message_headers($p); instead of $this->populate_message_headers($GLOBALS['MESSAGE']);

@pimlie pimlie self-requested a review November 29, 2019 18:48
Copy link
Owner

@pimlie pimlie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!


$p['output']['from']['value'] = $this->img_status . $p['output']['from']['value'];
$p['output']['from']['html'] = true;

return $p;
}

public function message_summary($p){
$this->populate_message_headers($GLOBALS['MESSAGE']);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didnt look this up in the docs but is using $GLOBALS really required?


$p['output']['from']['value'] = $this->img_status . $p['output']['from']['value'];
$p['output']['from']['html'] = true;

return $p;
}

public function message_summary($p){
$this->populate_message_headers($GLOBALS['MESSAGE']);
return array('content' => preg_replace('/(<span>\s*)()(From)/', '$1' . $this->img_status . ' $3', $p['content']));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please have a look at the comment/regex provided by @photoninger

@pimlie
Copy link
Owner

pimlie commented Jul 26, 2020

Closing this PR as support has been added in #37, thanks for your contrib though!

@pimlie pimlie closed this Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants