Author Topic: Change subject line in the listview (v1.5.2)  (Read 1448 times)

Offline roundman

  • Newbie
  • *
  • Posts: 2
Change subject line in the listview (v1.5.2)
« 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

Code: [Select]
<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:

Code: [Select]
<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

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline roundman

  • Newbie
  • *
  • Posts: 2
Re: Change subject line in the listview (v1.5.2)
« Reply #2 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

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Re: Change subject line in the listview (v1.5.2)
« Reply #3 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.
« Last Edit: February 24, 2022, 03:24:02 AM by JohnDoh »
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…