[RFC] Ability to @mention specific users in posts

Discuss requests for comments/changes posted in the Issue Tracker for the development of phpBB. Upcoming releases are 3.2/Rhea and 3.3.
Post Reply
Senky
Extension Customisations
Extension Customisations
Posts: 283
Joined: Thu Jul 16, 2009 4:41 pm

Re: [RFC] Ability to @mention specific users in posts

Post by Senky » Wed Sep 17, 2014 4:41 pm

JoshyPHP wrote:...If you're talking about the database, it doesn't really matter. I assume that the username column is indexed, the query will be about as fast whether there are 100 users or 100K. And either way you only want to return the first 10 or so.
True. But maybe we should think about some kind of protection to prevent DDoS attacks, since query will probably use % wildcard to search against username/username_clean columns...

User avatar
JoshyPHP
Registered User
Posts: 350
Joined: Fri Jul 08, 2011 9:43 pm

Re: [RFC] Ability to @mention specific users in posts

Post by JoshyPHP » Wed Sep 17, 2014 4:46 pm

The same action, the same kind of query (worse, actually) is already accessible in the members search.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1731
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Ability to @mention specific users in posts

Post by DavidIQ » Wed Sep 17, 2014 5:27 pm

Just cache the query for x amount of time? That's what Facebook does as well as others. Also it might be a good consideration to just have the BBCode for now although this isn't likely going to make it into 3.1 anyways so probably as an extension for now, maybe even an official one.
Image

User avatar
PayBas
Registered User
Posts: 305
Joined: Tue Jul 29, 2008 6:08 pm
Contact:

Re: [RFC] Ability to @mention specific users in posts

Post by PayBas » Wed Sep 17, 2014 7:08 pm

You could start off with

Type "@" > dropdown with all usernames in the topic, no extra queries. (PayBas, hanakin, etc.)
Type "Pa" > only PayBas remains (still no query)
Type "u" (forming "Pau") > script detects that there are no names like this in the available array, queries userbase for all users starting with "Pau", amongst which is "paulus".

User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC] Ability to @mention specific users in posts

Post by VSE » Thu Sep 18, 2014 4:36 am

@Pa should show a list (alphabetized) of every username starting with "pa", not just from the topic discussion.

We already have the SQL/AJAX for this, more or less, from the live member search.

We just need to AJAX call that function whenever there is an @ (cancel it if the next char is a space).

The only things the live member search does not do which I would like it and this to do, is allow keyboard control - up/down arrows to move through the list and enter to select one, and escape to cancel the list.
Has an irascible disposition.

User avatar
hanakin
Infrastructure Team
Infrastructure Team
Posts: 790
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: [RFC] Ability to @mention specific users in posts

Post by hanakin » Thu Sep 18, 2014 10:22 am

I would alos add the reqirement for nothing to preced the @ either to avoid the call on emails

User avatar
Darkness_demoN
Registered User
Posts: 89
Joined: Mon Jul 29, 2013 1:48 pm
Contact:

Re: [RFC] Ability to @mention specific users in posts

Post by Darkness_demoN » Sun Sep 21, 2014 2:34 pm

I hope you can make it real in last relice :)

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1731
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Ability to @mention specific users in posts

Post by DavidIQ » Sun Sep 21, 2014 11:37 pm

Darkness_demoN wrote:I hope you can make it real in last relice :)
Hate to break it to you but there is no ticket for it and here is no Pr for it so there is absolutely no chance this will be in the final release at this point. As I've already mentioned the best case scenario would be that an extension gets created for it. The applicable event location(s) should already exist so it shouldn't be a problem to create the extension by someone. However if there isn't even an "Ideas" entry for this on phpBB.com there is very little probability that this will become an official extension.
Image

User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

Re: [RFC] Ability to @mention specific users in posts

Post by imkingdavid » Mon Oct 13, 2014 1:47 pm

Just wanted to say, the username selection should not be limited to the users in friends and the users already in the topic. I'd assume that one major use of the feature would be to call other users to the topic, and restricting the allowed mentions to only a handful of users would make this feature less usable.

I like the plan from @Louis7777. That should work for our purposes, and if it needs to be changed based on something we're not considering now, we can handle that later.
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.

User avatar
jsebean
Registered User
Posts: 165
Joined: Wed Nov 17, 2010 1:40 am
Location: Atlantic Canada

Re: [RFC] Ability to @mention specific users in posts

Post by jsebean » Wed Oct 29, 2014 2:02 am

DavidIQ wrote:Just cache the query for x amount of time? That's what Facebook does as well as others. Also it might be a good consideration to just have the BBCode for now although this isn't likely going to make it into 3.1 anyways so probably as an extension for now, maybe even an official one.
BBCode would be the easiest, especially with the plain textarea that's being used now. Kind of defeats the purpose of @mentioning, but it would let you get someones attention in a topic if one wanted, which is the point.
-Jonah

Post Reply