Support Request SupportAny way to keep color used by chatter in memory?

Support Section
Previous topicNext topic
User avatar

Topic Author
Mornagest
Users
Users
Magic user status: Offline
Posts: 5
Joined: Jul 16th, '21, 18:49
    Ubuntu Firefox

Any way to keep color used by chatter in memory?

Post by Mornagest »

Your phpBB Version: 3.3.4
Your phpBB Type: Standard phpBB
Extensions installed: Yes
Your knowledge: Beginner

PHP Version: 7.4
MySQL Version: 10.3

What have you done before the problem was there?
Nothing ; I only wonder if that feature is possible or not :)

What have you already tried to solve the problem?
Not really a problem so no fix!

Description and Message
Your phpBB Version: 3.3.4
Your phpBB Type: Standard phpBB
Extensions installed: Yes
Your knowledge: Beginner

PHP Version: 7.4
MySQL Version: 10.3

What have you done before the problem was there?
Nothing ; I only wonder if that feature is possible or not :)

What have you already tried to solve the problem?
Not really a problem so no fix!

Description and Message
Your phpBB Version: 3.3.4
Your phpBB Type: Standard phpBB
Extensions installed: Yes
Your knowledge: Basic Knowledge
Boardlink: can't post an external link, sorry...

PHP Version: 7.4
MySQL Version: 10.3

What have you done before the problem was there?
Nothing ; I only wonder if that feature is possible or not :)

What have you already tried to solve the problem?
Not really a problem so no fix!

Description and Message
Hello!

I'm trying to configure a fresh phpBB3.3.4 board to migrate from vBulletin4 and I have a question about mChat:

Would it be possible to choose a color when chatting (i.e. green or whatever) and make the board remember that choice in a database to allow chatter to keep his own color.

That would improve the readability of the chatbox in my opinion, as we currently use this feature with VSA_chatbox on vB4.

I can imagine this could be difficult to code so the "support request" is more a question than a problem to fix.

So, thank you in advance for your answers! :tumbsyes:
User avatar

Sniper_E
VIP
VIP
Magic user status: Offline
Posts: 1116
Joined: Oct 14th, '14, 17:01
    Windows 10 Firefox

Re: Any way to keep color used by chatter in memory?

Post by Sniper_E »

Ajax Chat has that feature for a user to select a color and holds that color for the user.

I don't think mChat ever implemented that feature. But anything is possible.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™
User avatar

clight77
Users
Users
Magic user status: Offline
Posts: 495
Joined: Sep 24th, '15, 14:23
    Windows 10 Chrome

Re: Any way to keep color used by chatter in memory?

Post by clight77 »

Have a read here, pretty sure it has been done.

https://kasimi.net/viewtopic.php?f=4&t=312
User avatar

Topic Author
Mornagest
Users
Users
Magic user status: Offline
Posts: 5
Joined: Jul 16th, '21, 18:49
    Ubuntu Firefox

Re: Any way to keep color used by chatter in memory?

Post by Mornagest »

Hello and thank you for your answers!

Well I'm confused, I thought I read everything I could about mChat and colours and I even read that topic... and I think I was tired because I didn't understand it concerned computer users... :oops: :oops: :oops:

So the trick with Ctrl + left click on colour works fine! :thumbup:

I tried AjaxChat, but I experienced problems with some users (same group so same permissions but no way to post a message for some of them :wtf: ) so we are back with mChat :)

Thank you again!
User avatar

Sniper_E
VIP
VIP
Magic user status: Offline
Posts: 1116
Joined: Oct 14th, '14, 17:01
    Windows 10 Firefox

Re: Any way to keep color used by chatter in memory?

Post by Sniper_E »

That is crazy, my mchat has the hold color choice in the color selections and I never knew it.

I didn't get the memo.
User avatar

clight77
Users
Users
Magic user status: Offline
Posts: 495
Joined: Sep 24th, '15, 14:23
    Windows 10 Chrome

Re: Any way to keep color used by chatter in memory?

Post by clight77 »

Sniper_E wrote: Jul 17th, '21, 22:24 That is crazy, my mchat has the hold color choice in the color selections and I never knew it.

I didn't get the memo.
There's lots you don't know... LOL
User avatar

Topic Author
Mornagest
Users
Users
Magic user status: Offline
Posts: 5
Joined: Jul 16th, '21, 18:49
    Ubuntu Firefox

Re: Any way to keep color used by chatter in memory?

Post by Mornagest »

OK so we found a very strange bug linked to the "held-color" solution:

As soon as we choose a color that we keep in memory with Ctrl + left click, the auto-capital on first letter of the message in the chatbox is disabled.

That option comes back when we release the color choice to get back to default color.

Can you reproduce that bug?

Subsequent question: is there any fix?

Thank you in advance for your answers! :smile:
User avatar

clight77
Users
Users
Magic user status: Offline
Posts: 495
Joined: Sep 24th, '15, 14:23
    Windows 10 Chrome

Re: Any way to keep color used by chatter in memory?

Post by clight77 »

Yes I think that bug has been around for a long time.
As to a fix I don't know.
User avatar

Topic Author
Mornagest
Users
Users
Magic user status: Offline
Posts: 5
Joined: Jul 16th, '21, 18:49
    Ubuntu Firefox

Re: Any way to keep color used by chatter in memory?

Post by Mornagest »

OK thank you for your answer! This looks strange as I do not see why the encoding of the characters could be linked to the styling of the text, but so be it, I suppose ^^

edit : oooook it's quite simple to understand the problem:

each message with any tag (color, i, b...) does'nt start with a letter but with a [

So this [ is considered the first character of the message (which is true) and, while not appearing in the final result because it's interpreted, it is the first one.

I guess it would be difficult to correct that, maybe explaining the code to omit [ and ] as first characters? Or something like this (I'm not coder so I don't exactly know what can and what cannot be ^^).
User avatar

Sniper_E
VIP
VIP
Magic user status: Offline
Posts: 1116
Joined: Oct 14th, '14, 17:01
    Windows 10 Firefox

Re: Any way to keep color used by chatter in memory?

Post by Sniper_E »

Every bbcode starts with a [ and the bbcode does not end until the last ]

BBCodes are parsed when they are posted.

Code: Select all

[color=#AA0000]This is my red text.[/color]
When posted it parses into html

Code: Select all

<span style="color: #AA0000">This is my red text.</span>
This is my red text.

You can not omit [ and ] in a bbcode or it want be a bbcode.
You can find these bbcodes in your style's template/bbcode.html
User avatar

Topic Author
Mornagest
Users
Users
Magic user status: Offline
Posts: 5
Joined: Jul 16th, '21, 18:49
    Ubuntu Firefox

Re: Any way to keep color used by chatter in memory?

Post by Mornagest »

I agree with that :smile:

I'm wondering why the colored text doesn't start with a capital character, while the non-colored text does. So the hypothesis is that BBcode tags would count as the first character and so the rest of the text appears in normal characters, first "real" letter included.

But maybe I'm totally wrong and the tag parsing is omitted.

Nevertheless, it's not very important; just wondering why :smile:

Sorry if it's not very clear as English is not my mother tongue :oops:
Previous topicNext topic