OSSN MENTION USERS COMPONENT
This component enables a user to mention other users in posts and comments by using the syntax @Full Name or conditionally @username and that will send the mentioned user a notification telling them that they were mentioned in a post or comment with a link to that item.
This can be used in conjunction with the Display Username component as of v1.2 if you want to display usernames and mention @username instead of display Full Name and mention @Full Name. It will dynamically switch based whether or not the Display Username component is installed and turned on. You can find more info on it here: https://www.opensource-socialnetwork.org/component/view/3065/display-username
When mentioning usernames using the Display Username component the exact casing must be used to match the user.
When mentioning user full names the casing DOES matter as that can help find uniqueness.
Mentions are not limited to the friends of the user, the entire user base can be mentioned
Multiple mentions can be done in a post or comment.
CHANGE LOG
-------------------1.9.1------------------
Added ability to parse off trailing '(apostrophe) and 's for use in plurals and ownership
Added recommended method and hooks from Z-Man
-------------------1.9--------------------
Added 'ossn:notifications:mention:post:created' to en locale
Added 'ossn:notifications:mention:comment:created' to en locale
Renamed init method from basic name to prevent potential collision with other components
POSSIBLE ENHANCEMENTS
No UI based on prototype having significant cons
?
I wasn't able to install 1.9. It gives me an upload error.
Bryce, please note before providing the next release:
You should add 2 new hooks to your code like
// hooks for preventing wrong participants notification records
ossn_add_hook('notification:participants', 'mention:post:created', 'com_mention_suppress_participants_notifications');
ossn_add_hook('notification:participants', 'mention:comment:created', 'com_mention_suppress_participants_notifications');
with the corresponding function
function com_mention_suppress_participants_notifications($hook, $type, $return, $params) {
$notifyParticipants = false;
return $notifyParticipants;
}
Because, up to 5.1 we have a problem that wrong participant notification may be created (formerly with Likes only, but your component will be involved, too ) see issue #1530
I have provided a fix already with pull #1531 and #1532
and your own component will be prepared to make use of it by adding the code above
And yes: I would be a little happier to see all of your functions start with 'com_mention_.....'
:)
Hey I'm always willing to try Arsalan, that could be a good option with it being able to do Ajax. The one I was trying was way too bulky and it worked really well in prototype with a handful of users but I could tell it would blow up like Z Man also suggested when implemented on a large userbase
I was looking this jquery extension and thought maybe we can integrate it into this component https://podio.github.io/jquery-mentions-input/ but it maybe bit tricky and requires bit of work.
Well crud, I just realized something. I was typing about someones recommendation and typed "@Mike Tyson's" and thought hmm, well that's not going to work well at all for that use case so I will be doing an update to 1.9 to cover 2 scenarios.
Expect an update in the coming day or so.
Bryce
There is no UI on this one. Upon experimentation it would be too taxing on a large user base to the framework so I decided against it, ZMan also agreed it wouldn't be a good idea. So you have to type it out all the way and when you submit your post or comment the backend sends out the notifications to the respective users.
Nice Bryce! successfully installed
the UI doesn't work?
in future if you want some idea to upgrade @Mention
you can create some automatically engine link to which takes to the user profile
like a facebook
Fixed, somehow my directory structure got screwed up again. 1.9 is good to go
Rafail. I'm so sorry, I will get this fixed ASAP. Expect a new 1.9 uploaded within the hour. I will post up when it is done
Hello guys and good job Bryce
in the current update 1.9 does not allow to install component
"Cannot upload component, make sure it is a valid package."