Roundcube Community Forum

Release Support => Pending Issues => Topic started by: roundman on February 23, 2022, 07:53:51 AM

Title: Change subject line in the listview (v1.5.2)
Post by: roundman on February 23, 2022, 07:53:51 AM
Hi,
I want to manipulate the subject in the listview. This is the original HTML Source code

<span class="subject">
<span id="msgicnrcmrowNTA" class="msgicon status" title=""></span>
<a href="./?_task=mail&amp;_mbox=INBOX&amp;_uid=50&amp;_action=show" onclick="return rcube_event.keyboard_only(event)" onmouseover="rcube_webmail.long_subject_title(this,1)" tabindex="-1" title="This is the subject text"><span>This is the subject text</span></a>
</span>


The result I wish is:

<span class="subject">
<span id="msgicnrcmrowNTA" class="msgicon status" title=""></span>
<a href="./?_task=mail&amp;_mbox=INBOX&amp;_uid=50&amp;_action=show" onclick="return rcube_event.keyboard_only(event)" onmouseover="rcube_webmail.long_subject_title(this,1)" tabindex="-1" title="This is the subject text"><span>This is the <span class="my_highlight">subject</span>text</span></a>
</span>


Also I want replace in the subject string a part of string with an other string.
In which file I can do this?

Best regards
Christoph
Title: Re: Change subject line in the listview (v1.5.2)
Post by: JohnDoh on February 23, 2022, 11:03:27 AM
have a look at https://github.com/roundcube/roundcubemail/wiki/Plugin-Hooks#messages_list
Title: Re: Change subject line in the listview (v1.5.2)
Post by: roundman on February 23, 2022, 11:30:50 AM
Thank you for answer.
Do you mean this plugin: plugins\additional_message_headers
Do you have an example, how can I replace a string in the list view
Thanks
Best regrards
Title: Re: Change subject line in the listview (v1.5.2)
Post by: JohnDoh on February 24, 2022, 03:20:42 AM
the additional_message_headers plugin adds headers to outgoing messages. you said you wanted to change the list view so I think the message messages_list hook should be the one you want I think.

You can use the additional_message_headers plugin which ships with roundcube as a starting point and then change the hook it works off.