more simply, the spaces are a problem: when does we stop to search for the username? Does we search for @Hi@Hi Oh@Hi Oh Great@Hi Oh Great Conflict or @Hi Oh Great Conflict with spaces?
And i don't think we can find a solution because all characters are allowed in the usernames, so we can't use something like that @'Hi Oh Great Conflict' with space
Member of the phpBB Development-Team No Support via PM
Wouldn't it be a system much like Facebook's (or Twitter's) where a list of users is presented and you select one, with some sort of html tag appended to the selection? One knows this is happening in the background because nowadays you can tag "John Doe" and delete the "Doe" part after having selected the user. In the case of phpBB we'd present a list of users, you select the user, and then perhaps a BBCode is assigned to it whereas the user ID is referenced. Won't really mater if you change the username since the user's ID you want to mention is already attached. Then this scenario of Mr. "Oh Great Conflict" won't matter.
How about using quotes for names that have spaces. So @"Hi Oh Great" would only match a user with the username Hi Oh Great and wouldn't match Hi or HI Oh. The quotes would be optional but if omitted it would assume the first valid username it finds. So if there is a user HI and a user Hi Oh and you do @Hi Oh it would notify Hi but if you did @"Hi oh" it would notify HI oh.
A question then, if there is no user named Hi but there is a user named Hi Oh and you did @Hi should it assume the username Hi Oh or should it be unparsed? I vote unparsed.
EDIT: Looks like I missed the last 3 posts because I didn't realize there was another page. Good point about usernames being able to have any characters. However, I think we can, at the start, allow escaping quotes (e.g. @"Say \"Hello\"" or something until we get to the point that DavidIQ was talking about. I think we should start off simple and eventually use some special tags in the background somehow.
I do custom MODs. PM for a quote! View My: MODs | Portfolio Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.
The idea earlier was to use bbcodes for this, e.g. [mention]some user[/mention]. To make it "nice" like how everyone else does it, since we do not use a wysiwyg editor to hide those bbcodes, we would simple make a javascript listener for when someone types @[^\s] in the text area and then pop out a username search based on what they have typed since the @ sign. Hitting esc would close the window, and selecting a user or hitting enter would replace the @ and whatever they typed with the selected user wrapped in a [mention] tag.
EXreaction wrote:The idea earlier was to use bbcodes for this, e.g. [mention]some user[/mention]. To make it "nice" like how everyone else does it, since we do not use a wysiwyg editor to hide those bbcodes, we would simple make a javascript listener for when someone types @[^\s] in the text area and then pop out a username search based on what they have typed since the @ sign. Hitting esc would close the window, and selecting a user or hitting enter would replace the @ and whatever they typed with the selected user wrapped in a [mention] tag.
I agree that this is the way to do it for phpBB. And of course when rendered in the post, it would look like @EXreaction