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
?
The only problem i see is you used the type post:created for mentions which is wrong. you should do something like : (type should be mentions:component
or something else , here you are injecting type of callback which may later create issues.
$notifications->add('mentions:component:post'...
then adjust
ossn_add_hook("notification:add", "mentionds:component:post", "com_mention_notifier");
ossn_add_hook("notification:view", "mentionds:component:post", "com_mention_notifier_view_notification");
// similar for comments
Johannes,
The only way it works with usernames is to use in conjunction with Z Man's Display Username component like you had guessed. I don't understand how users would know each other's user names without having them displayed in some fashion.
Excellent! just what i was about to suggest ., and there it is already available., thank you
I like this component and I will use it! While full name seems to work as advertised, I can't get notifications to work for usernames for some reason. Can it have something to do with me not using the Display Username component?
FIXED! Git ruined the permissions on the folder so the zip I created didnt work. Please try again
oops, looking into it now, I dont know why it failed suddenly
Hi, Bryce!
Nice work but the archive seems to be broken. It cant be uploaded.
ERR MSG: ...doesnt seem to be a valid zip file.