QTE Extension Support?
Re: QTE Extension Support?
I created a ticket for the BBCode bug: https://github.com/kasimi/mChat/issues/23
Re: QTE Extension Support?
Some more info about this:
I've added on ACP global mchat settings, some disallowed bbcodes: hr|tr|br
If I send a message, it will not parse them and fix the problem, but on the automatic notifications, they are being parsed. Any easy way to fix this so automatic notifications will too disallowed those bbcodes?
I've added on ACP global mchat settings, some disallowed bbcodes: hr|tr|br
If I send a message, it will not parse them and fix the problem, but on the automatic notifications, they are being parsed. Any easy way to fix this so automatic notifications will too disallowed those bbcodes?
Re: QTE Extension Support?
By default there are no BBCodes in notification messages. Unless you added some, you can disable BBCode parsing completely by commenting this line: https://github.com/kasimi/mChat/blob/2. ... .php#L1265
Re: QTE Extension Support?
Well, the notification of a new message will send a notification message of a new topic created, so the topic title since it has sometimes [br] or [tr] or [hd] and since I've those as bbcodes, they're being parsed too. And it shouldnt since I added them to the disallowed bbcodes.
EDIT: I shouldnt call "notification", since phpbb has a notification system. What I mean is the automatic messages.
EDIT: I shouldnt call "notification", since phpbb has a notification system. What I mean is the automatic messages.
Re: QTE Extension Support?
It should not only not render your forbidden BBCodes, but it should not render any BBCodes at all. What you're asking for requires lots of code changes, whereas commenting that one line should work just fine. I'm not even sure it's worth putting more effort into this. Are BBCodes in mChat's notification messages actually a much needed feature?
Re: QTE Extension Support?
Let me start again, I beleive we're not talking about the same thing. Forget about notifications, I shouldnt used that word lol
On mchat we can send manually a message, let use this message as example:
If I send this to my chat manually, it will process the [HR] [TR] and [BR] (because I've created those custom bbcodes). And to try to fix this, I've added those to the disallaowed list: br|hr|tr
After adding those to the disallowed list, and try to send again the same line, now it works perfectly and it doesnt parse that bbcode, it still parse the [url] ofc, thats what we want xD So all great so far.
Now, if we create a new topic with the same text above "Topic Title here with this code [HR][TR][BR] on the title", mchat system will automatically send a new message on the chat (exactly as our text above used as example) but it bugs on those bbcodes... on the [br] one it ads an enter, it parse the bbcode instead of ignoring it.
On mchat we can send manually a message, let use this message as example:
New Topic: [url=https://domain.com]Topic Title here with this code [HR][TR][BR] on the title[/url] in [url=https://domain.com]Forum Name[/url]
If I send this to my chat manually, it will process the [HR] [TR] and [BR] (because I've created those custom bbcodes). And to try to fix this, I've added those to the disallaowed list: br|hr|tr
After adding those to the disallowed list, and try to send again the same line, now it works perfectly and it doesnt parse that bbcode, it still parse the [url] ofc, thats what we want xD So all great so far.
Now, if we create a new topic with the same text above "Topic Title here with this code [HR][TR][BR] on the title", mchat system will automatically send a new message on the chat (exactly as our text above used as example) but it bugs on those bbcodes... on the [br] one it ads an enter, it parse the bbcode instead of ignoring it.
Re: QTE Extension Support?
Thanks for clarifying, but we are in fact talking about the same thing, though I should have been more precise.
Instead of looking at the disallowed BBCodes, BBCode rendering should be skipped completely for both
The solution could look like this:
Doing it this way, parsing happens before the topic title and forum name are added and therefore they won't be rendered.

Instead of looking at the disallowed BBCodes, BBCode rendering should be skipped completely for both
Topic Title here with this code [HR][TR][BR] on the title
and Forum Name
because post subjects and forum names don't support BBCodes in the first place.The solution could look like this:
Code: Select all
$message = lang('MCHAT_NEW_REPLY', '[url=http://...]%POST_SUBJECT%[/url]', '[url=http://...]%FORUM_NAME%[/url]');
$message = parse_bbcodes($message);
$message = str_replace('%POST_SUBJECT%', 'Topic Title here with this code [HR][TR][BR] on the title', $message);
$message = str_replace('%FORUM_NAME%', 'Forum Name', $message);
Who is online
Users browsing this forum: No registered users and 2 guests