MyBB Community Forums

Full Version: Automention: Autocomplete Mention
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Thats why I use MentionMe - supports space and special chars in usernames
Works like a charm! Thank you for writing this. I had been looking for this for a while. Smile
(2019-12-14, 12:22 AM)andrewjs18 Wrote: [ -> ]@martec,

I'm trying out your latest edit from your post above and when I try to tag a user, it's adding #undefined to the end of the tag, like so:

@Chuck W#undefined

i tested today... unfortunately I was unable to reproduce the problem.

I modified the code a little ... so try the version of the attachment of this post.
@martec - thx, unfortunately it needs a change - I added info in your GitHub repo with details.

EDIT:
- is possible to add a fallback to default avatar set in ACP?
- is possible to support full text search?

I was checking for another library (now it uses at.js which is discontinued and abandoned)... I have found tribute - zurb/tribute: ES6 Native @mentions (github.com) - maybe it would worth instead of replacing classes... we will see Smile
Add space support (Not recommended)

Open and edit automention.js

Find:

regexp = new XRegExp('(\\s+|^)' + flag + '([\\p{L}|.~\+\-\|\\p{N}]+)$', 'gi');

Replace:

regexp = new XRegExp('(\\s+|^)' + flag + '([\\p{L}|\\s.~\+\-\|\\p{N}]+)$', 'gi');

Fallback to default avatar (Ps. No setting in ACP)

Use the version below of Attachment
Great! +1 added

One more request - full text search:

- if you have for example nickname: "Jacob MyBB" and you wrote "My" it is displayed. I think that it must be supported by the library itself.

Something like this (Quick reference)
[Image: FuxU7Sd.png]

Thank you!
(2021-03-16, 12:49 PM)Eldenroot Wrote: [ -> ]Great! +1 added

One more request - full text search:

- if you have for example nickname: "Jacob MyBB" and you wrote "My" it is displayed. I think that it must be supported by the library itself.

Something like this (Quick reference)
[Image: FuxU7Sd.png]

Thank you!

sorry, but i don't have enough regex knowledge to do this.
Great! But I would like to know if it works with the quick reply option. Thanks in advance!
(2021-03-17, 06:22 AM)hidaso Wrote: [ -> ]Great! But I would like to know if it works with the quick reply option. Thanks in advance!

yes work too in quick reply text area...
1.3.6 released

Change log: https://community.mybb.com/mods.php?acti...og&pid=558

1.3.6 Enhanced version released

1.3.6 with the following more features
  • Added fulll-text support
  • Added space support

Thanks @Eldenroot and @Laird!!

Ps. This enhanced version will be able to use more server resources and make typing less fluid.

Download: https://github.com/martec/automention/releases
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19