[GSOC] Add ability to tag specific users in posts using @

Discuss general development subjects that are not specific to a particular version like the versioning control system we use or other infrastructure.
Post Reply
flash1452
Registered User
Posts: 1
Joined: Sun May 28, 2017 7:08 am

[GSOC] Add ability to tag specific users in posts using @

Post by flash1452 » Tue Jun 06, 2017 5:37 pm

Allows users to mention other users in posts. If a user is mentioned, the user will receive a notification unless he has deactivated this notification. Mentioned usernames will be auto suggested and once the user selects one of the users the searchphrase will be replaces with the [url /] linking the tagged user's profile.<br/>

Phase 1 Implementing the frontend of the module

This includes detecting @ character, displaying an auto-suggest dropdown and replacing the searched username phrase by the selected username from the auto suggest list.

Some of the external libraries considered for achieving this behaviour -
  • At.js Depends on caret.js, compatible with textarea as well as content-editable document elements. For more features visit https://github.com/ichord/At.js#user-co ... es-preview. But one of the drawbacks with At.js is its heavy codebase that is not favorable to integrate in the current PhpBB codebase. Official repo for At.js - https://github.com/ichord/At.js
  • Mention.js - The biggest advantage of mention.js is that it almost covers everything we need for the frontend of our project and besides that it is very lightweight due to which it can be easily modified according to the project's needs. Some of the things needed to be changed are - autosuggest should be purely based on phpbb Usernames and not personal names. Besides, that username wrapped around which can be achieved by modifying the _updater function in mention.js file. For official codebase visit - https://github.com/jakiestfu/Mention.js/.


User avatar
Ger
Registered User
Posts: 270
Joined: Mon Jul 26, 2010 1:55 pm
Location: 192.168.1.100
Contact:

Re: [GSOC] Add ability to tag specific users in posts using @

Post by Ger » Thu Jun 08, 2017 11:54 am

Nice, this is much requested.
You might want to take a look at this extension

Also: you should consider whether or not to support phpBB 3.1, since the parsing process is quite different. I don't know why Paul chose to require phpBB 3.2 for his extension but this might be due to the new textformatter.
Above message may contain errors in grammar, spelling or wrongly chosen words. This is because I'm not a native speaker. My apologies in advance.

User avatar
paulus Online
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 361
Joined: Thu Sep 16, 2004 9:02 am
Contact:

Re: [GSOC] Add ability to tag specific users in posts using @

Post by paulus » Thu Jun 08, 2017 6:01 pm

Thanks for posting it Vishal :).

I have looked into it a bit more as well, and I think there are two drawbacks in mention.js;
  • It hasn't been updated in nearly 4 years. I think we should prefer libaries that get updated a bit more often, even if that means the resulting libary is much larger.
  • It has no support by default for remote quering of usernames based on what is being typed. While we can intergrate this ourself, I think it would be favourable if the used libary does support this feature already. I don't like it if we need to modify a existing libary because we want a specific feature.
Iam also wondering if it is too simple. It has some basic functionality, but anything more advanced requires modification to it. This means if we want too update the library later on (If a new version ever gets released) we need to be carefull not to overwrite our changes. The goal of using a library is that code is written for us, not that we need to modify the library to suit our needs.

Regarding at.js, I would like to see why you think it is hard to implement into the phpBB code base, because if I look at the readme the basic intergration is really simply. It might require some more configuration to work properly with our backend, but that should not be too hard.

In my opinion the way to go is using at.js, for the reason it has the features we need (Remote backend), and is recently updated.

Ger wrote:
Thu Jun 08, 2017 11:54 am
Nice, this is much requested.
You might want to take a look at this extension

Also: you should consider whether or not to support phpBB 3.1, since the parsing process is quite different. I don't know why Paul chose to require phpBB 3.2 for his extension but this might be due to the new textformatter.
It won't be a extension, but a core feature, so it will be 3.3 anyways :)
Image

Post Reply