Simple Mention conflict with native phpbb quote post - Simple mentions
Simple Mention conflict with native phpbb quote post
Please someone know how can i fix this problem?
After install simple mention can note several messages are published with desconfigured text, only if the post has a quote with a user mention.
Ext Simple mention are going some conflite when a user quote a post if inside this quote post have a Simple mention "@username", the system mention recognizes that the user want mention that user AGAIN, and display for every side of the post, when click, a dropdown from Ext Simple mention with this user again, that was write in the quote. So user when write press enter to change line and a new mention is addided in the post replacing many words of the post. So the quote are being publish with lot of iqual Mention from the same user, from that use was mention in a quote. Can undastand?
Please try you some times, quote a post with there is a valid mention user "@username", after it click to write in some parts of de message, and see if acour to you too please, displey the dropdown from that user again.
i hope it can be save becouse this extention is icrerible
thanks so much for your contrituition dear
Have a nice day!
- GOLX
- Registered User
- Posts: 162
- Joined: Tue Aug 02, 2016 1:17 am
- Contact:
Re: Simple Mention conflict with native phpbb quote post
Race condition
Who's there?
Keep your 3D printing filament inventory easy • My Photos • my phpBB Extensions • custom phpBB work & Development
-
- Infrastructure Team Leader
- Posts: 28616
- Joined: Sat Dec 04, 2004 3:44 pm
- Location: The netherlands.
- Name: Paul Sohier
- Contact:
Re: Simple Mention conflict with native phpbb quote post
Thanks for this information Paul! Nice to know it! SO i am waiting to fix this problem. Thanks!!Paul wrote:It is a known bug caused by a library used in this extension. It has been reported there but not yet fixed.
- GOLX
- Registered User
- Posts: 162
- Joined: Tue Aug 02, 2016 1:17 am
- Contact:
Re: Simple Mention conflict with native phpbb quote post
Hello @Paul!Paul wrote:It is a known bug caused by a library used in this extension. It has been reported there but not yet fixed.
All nice?!
PLease, Do you can say me where (a link) I can follow the fix for this question? Some prevision to fix?
I will be very grateful!
Thanks so much!
- GOLX
- Registered User
- Posts: 162
- Joined: Tue Aug 02, 2016 1:17 am
- Contact:
Re: Simple Mention conflict with native phpbb quote post
Paul,Paul wrote:It is a known bug caused by a library used in this extension. It has been reported there but not yet fixed.
Is possible to do a javascript to solve this questions?
I have been thinking here some things to solve this problem.
I dont know well JS but say me please if it is possible, use js to transformer the caracter "@" or "[mention]" when in page of posting only, into quote only, is where the problem occours: page class .section-posting.
like a js do a space where see "@username", and do it "@ username", this way the Mention extention do not reconize as a mention more into quote, when in the posting page.
Something like it is possible to fix?
Maybe this can be insane or not, only you can tell me.
hope I help to fix this great extention guys
tell me please. thanks for your effort!
Good luck!
- GOLX
- Registered User
- Posts: 162
- Joined: Tue Aug 02, 2016 1:17 am
- Contact:
Re: Simple Mention conflict with native phpbb quote post
thanks for the idea. it's a pretty ugly hack, but it works. i think now i can actually use the extension.GOLX wrote:like js do a space where see "@username", and do it "@ username", this way the Mention extention do note reconize as a mention more into quote, when in the posting page.Paul wrote:It is a known bug caused by a library used in this extension. It has been reported there but not yet fixed.
if you'd like to try it for yourself:
this shows the line in
main_listener.php
you need to edit:https://github.com/paul999/mention/blob ... r.php#L291
so in
remove_mention_in_quote()
, change this:Code: Select all
$page_data['MESSAGE'] = preg_replace('#\[mention\](.*?)\[\/mention\]#uis', '@\\1', $page_data['MESSAGE']);
Code: Select all
$page_data['MESSAGE'] = preg_replace('#\[mention\](.*?)\[\/mention\]#uis', '@ \\1', $page_data['MESSAGE']);
another option (which is what i did) is to simply remove the at sign like this:
Code: Select all
$page_data['MESSAGE'] = preg_replace('#\[mention\](.*?)\[\/mention\]#uis', '\\1', $page_data['MESSAGE']);
- dingus33
- Registered User
- Posts: 136
- Joined: Fri Sep 29, 2017 11:11 am
- Contact:
Re: Simple Mention conflict with native phpbb quote post
dingus33 wrote:thanks for the idea. it's a pretty ugly hack, but it works. i think now i can actually use the extension.GOLX wrote:like js do a space where see "@username", and do it "@ username", this way the Mention extention do note reconize as a mention more into quote, when in the posting page.Paul wrote:It is a known bug caused by a library used in this extension. It has been reported there but not yet fixed.
if you'd like to try it for yourself:
this shows the line inmain_listener.php
you need to edit:
https://github.com/paul999/mention/blob ... r.php#L291
so inremove_mention_in_quote()
, change this:
to this:Code: Select all
$page_data['MESSAGE'] = preg_replace('#\[mention\](.*?)\[\/mention\]#uis', '@\\1', $page_data['MESSAGE']);
it's just adding a space.Code: Select all
$page_data['MESSAGE'] = preg_replace('#\[mention\](.*?)\[\/mention\]#uis', '@ \\1', $page_data['MESSAGE']);
another option (which is what i did) is to simply remove the at sign like this:
PS: not sure if you saw my other post, paul.. but again, can you please show us specifically where it's been reported? like which github issue?Code: Select all
$page_data['MESSAGE'] = preg_replace('#\[mention\](.*?)\[\/mention\]#uis', '\\1', $page_data['MESSAGE']);
Great dingus33 !!!
Thanks so much for your contribuition!!
Yes I do the changes and it work very well now!
Increrible!
Thank you so much for using my insane thinking and turning it into a solution.
Very Happy becouse this extention is great and now i can continue to use too!!!
Thanks all guys
- GOLX
- Registered User
- Posts: 162
- Joined: Tue Aug 02, 2016 1:17 am
- Contact:
Re: Simple Mention conflict with native phpbb quote post
-
- Registered User
- Posts: 46
- Joined: Tue Oct 09, 2018 3:50 pm
- Contact:
Re: Simple Mention conflict with native phpbb quote post
Create this custom bbcode:
You can add the class mention if you want.
Then on the function remove_mention_in_quote() on file main_listener.php , replace the @ with the bbcode tag like this:
$page_data['MESSAGE'] = preg_replace('#\[mention\](.*?)\[\/mention\]#uis', '[qmention]\\1[/qmention]', $page_data['MESSAGE']);
it works perfect for me!
-
- Registered User
- Posts: 8
- Joined: Tue Oct 16, 2018 11:43 am
- Contact:
Re: Simple Mention conflict with native phpbb quote post
great job, that is an even nicer solution.eselva wrote:I found the way to keep the @ without space:
Create this custom bbcode:
You can add the class mention if you want.
Then on the function remove_mention_in_quote() on file main_listener.php , replace the @ with the bbcode tag like this:
$page_data['MESSAGE'] = preg_replace('#\[mention\](.*?)\[\/mention\]#uis', '[qmention]\\1[/qmention]', $page_data['MESSAGE']);
it works perfect for me!
- dingus33
- Registered User
- Posts: 136
- Joined: Fri Sep 29, 2017 11:11 am
- Contact:
Re: Simple Mention conflict with native phpbb quote post
Race condition
Who's there?
Keep your 3D printing filament inventory easy • My Photos • my phpBB Extensions • custom phpBB work & Development
-
- Infrastructure Team Leader
- Posts: 28616
- Joined: Sat Dec 04, 2004 3:44 pm
- Location: The netherlands.
- Name: Paul Sohier
- Contact:
Re: Simple Mention conflict with native phpbb quote post
remove_mention_in_quote()
was for sure necessary because that's where the problematic at sign gets inserted when you quote- dingus33
- Registered User
- Posts: 136
- Joined: Fri Sep 29, 2017 11:11 am
- Contact: