Roundcube Community Forum

 

Change subject line in the listview (v1.5.2)

Started by roundman, February 23, 2022, 07:53:51 AM

Previous topic - Next topic

roundman

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

JohnDoh

Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

roundman

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

JohnDoh

#3
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.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...