Skip to content

Conversation

@dragomano
Copy link
Contributor

@dragomano dragomano commented Mar 10, 2024

The script used to mention users was updated 9 years ago, it would be nice to replace it.

The AT.js developer himself suggests using Tribute.js as a replacement, so I chose one of the latest forks.

Features

  • single script (tribute.js) instead of 2 (jquery.atwho.min.js, jquery.caret.min.js)
  • no dependencies on jQuery
  • there is no need to change the PHP backend code (we only change mentions.js)
  • there is a possibility of fine tuning (see options)

sshot-2

Signed-off-by: Bugo <cheetah@bk.ru>
@live627
Copy link
Contributor

live627 commented Mar 10, 2024

Thanks! (just the emoji isn't enough)

Signed-off-by: Bugo <cheetah@bk.ru>
Signed-off-by: Bugo <cheetah@bk.ru>
Signed-off-by: Bugo <cheetah@bk.ru>
Copy link
Member

@Sesquipedalian Sesquipedalian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely like the idea of updating to a more recent and maintained script.

However, more work needs to be done on this PR in order to make it fully compatible with SCEditor. In particular, the script only works when the editor is in source mode. It doesn't interact at all with the editor when it is in WYSIWYG mode.

Could you get this working with WYSIWYG mode, @dragomano? Once that is done, I will be glad to merge this PR.

@dragomano
Copy link
Contributor Author

If SCEditor is planned to be kept, it would be better to write a separate mentions plugin specifically for it. As it turns out, Tribute.js has issues with support for iframe and WYSIWYG editors.

@dragomano dragomano marked this pull request as draft April 26, 2024 12:08
Signed-off-by: Bugo <cheetah@bk.ru>
Signed-off-by: Bugo <cheetah@bk.ru>
@Sesquipedalian
Copy link
Member

If SCEditor is planned to be kept

It is. If you want to find or create a solution that works with the WYSIWYG editor, that'd be lovely.

@dragomano
Copy link
Contributor Author

The modern solutions have the tendency to abandon BBCode. For example, CKEditor 4 has BBCode addon, and perfect Mentions/ Tags and Emoji addon (3 in 1), but CKEditor 4 reached its End of Life (EOL) in June 2023. And CKEditor 5 doesn't have BBCode addon.

@Sesquipedalian
Copy link
Member

Sesquipedalian commented Apr 27, 2024

Sorry if I wasn't clear. We have no plans to get rid of SCEditor. I meant that if you can find a solution to the problem that tribute.js doesn't work with SCEditor's WYSIWYG mode, that would be great. If that isn't possible, then we'll need to stick with at.js.

jdarwood007 added a commit to jdarwood007/SMF that referenced this pull request Aug 8, 2025
Fixes SimpleMachines#8820

Big note, 2.1 handled names differently so a bit of compatibility had to be added here.

If SimpleMachines#8132 is accepted then it needs to ensure it doesn't reintroduce this issue.
@jdarwood007
Copy link
Member

@dragomano, If you still plan this, a conflict exists. But ensure that the issue you raised in #8820 doesn't return here.

@live627
Copy link
Contributor

live627 commented Aug 11, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants