Thread Rating:
  • 5 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Automention: Autocomplete Mention
Thats why I use MentionMe - supports space and special chars in usernames
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
Works like a charm! Thank you for writing this. I had been looking for this for a while. Smile
Reply
(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.


Attached Files
.zip   automention.zip (Size: 32.56 KB / Downloads: 33)
Reply
@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
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
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


Attached Files
.zip   automention.zip (Size: 32.61 KB / Downloads: 27)
Reply
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!
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
(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.
Reply
Great! But I would like to know if it works with the quick reply option. Thanks in advance!
Reply
(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...
Reply
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)