Poll: What sort of mention structure should MentionMe use?
You do not have permission to vote in this poll.
Name-based (Currently Using)
8 33.33%
3 12.50%
Just wait for MyBB to put mentions in the core
10 41.67%
UID-based w/backward compatibility (labrocca's idea)
3 12.50%
Total 24 vote(s) 100%
* You voted for this item. [Show Results]

Should MentionMe Change From @username To @<mention:123>
(2018-01-21, 10:25 PM)Euan T Wrote:
(2018-01-21, 09:14 PM)Wildcard Wrote:
(2018-01-21, 08:56 PM)Euan T Wrote:

This would also allow mentions of the form "@#1" which miss the username.

Yes, but it wouldn't match Jordan's test case: @JohnnyIs#1#123

Yes it would.

There are other issues with that regex like Issue was fixed by @Euan T#2114 in #1234
(2018-01-22, 03:34 AM)labrocca Wrote: Pretty good idea looking at your full post.

Thanks. I've been giving it some more thought and I think that it is doable.
(2018-01-22, 11:18 AM)JordanMussi Wrote: There are other issues with that regex like Issue was fixed by @Euan T#2114 in #1234



Easy fix. It was missing a '?' Wink
Quote:If we tracked mentions in a separate 1-4 column table [...]

I believe it would be _more practical_ to just store all mention data in a column within the post table.

Store UIDs in a column, replace tags with a placeholder in the _message_ column, finally do all parsing and formating during _postbit_.

I remember flash.tato's tag plugin to do something like this, imo one of the best tagging plugin at that time.

The problem with that idea is that posts can have multiple mentions and a query to determine if a user had already been mentioned in a specific post would become much more expensive if it required decoding JSON to get a list of mentioned users in a post.
Why would you need to know if an user was already tagged ? Alerts are inserted during post insertion/update don't they? Unless the administrator is constantly purging alert content, you can already know if an user was already tagged for a specific post (and alerted) just by checking the alerts table.
From a conversation about using only user IDs in mention tags:
Devilshakerz Wrote:The purpose of the mention code may be more clear when inserting it in source mode, and similarly, it may be more convenient when editing content in source mode (otherwise only obscure user IDs would be shown).

I'm also considering simplifying the syntax by dropping the quoting feature (using " / ' / `) and removing special characters from usernames in MyCode, so an automated picker inserts @adminsseecondaccount#123, but the original @Admin's Second Account is displayed (the plugin would have to include the picker feature first).

Effectively, in the @recognition-string#user-id syntax, where the user ID would be the preferred selector, and the recognition-string would be for the editor's convenience only, any special characters in the username could be stripped, avoiding the implementation of quoting characters.

If the simple syntax of @username is supported, mentions of users whose names contain special characters would need to rely on user IDs (worth keeping in mind if comfort of editing raw messages - in source mode - is important).
devilshakerz.com/pgp (DF3A 34D9 A627 42E5 BC6A 6750 1F2F B8AA 28FF E1BC) ▪ keybase.io/devilshakerz

Forum Jump:

Users browsing this thread: 1 Guest(s)