Warning: The author of this contribution does not provide support for it anymore.

phpBB mChat

mChat username - phpBB mChat

mChat username

by satedu » Mon Dec 18, 2023 7:42 pm

Hello
I am a new member of the forum
I am using the translator
So please excuse any spelling mistakes
I have version 2.1.4 installed
What to do so that clicking on the user causes the display
in the dialog box
and it didn't take me to his profile
satedu
Registered User
Posts: 2
Joined: Mon Dec 18, 2023 7:23 pm

Re: mChat username

by satedu » Thu Dec 21, 2023 12:44 pm

I will answer myself :)


Whith this feature, clicking on nickname of message's author will inserts mention code into text field (textarea\input). Jumping to profile when clicking on avatar remains.

In /ext/dmzx/mchat/styles/prosilver/template/mchat_messages.html replace

CODE: SELECT ALL

Code: Select all

{{ mchatrow.MCHAT_USERNAME_FULL }}
or

CODE: SELECT ALL

Code: Select all

{ mchatrow.MCHAT_USERNAME_FULL }
with

CODE: SELECT ALL

Code: Select all

<span onclick="$('#mchat-input').val($('#mchat-input').val() + '[ref]{mchatrow.MCHAT_USERNAME}[/ref], '); $('#mchat-input').focus();" title="{L_MCHAT_RESPOND}" style="font-weight: bold; cursor: pointer; color: {mchatrow.MCHAT_USERNAME_COLOR}">{mchatrow.MCHAT_USERNAME}</span>
and all work is done.

You can replace ref with i or b or whatever you use to highlight nicknames. Of course, if you're didn't have ref-code, add it (in ACP -> Messages -> BBcodes)(I recommend use it to have ability to change nickname's highlight in messages).
satedu
Registered User
Posts: 2
Joined: Mon Dec 18, 2023 7:23 pm