Mention Users with @ Download 1.9.1

us bryce alvord 4 weeks ago

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

  • ?

Comments
se Johannes Genberg Replied 22 hours ago

@Zman

Sorry, I havn't been online much the last week. Yes, I have done exactly that, but it doesn't matter anymore as I was able to install 1.9.1 just fine.

German ~Z~ Man Replied 2 days ago

@Johannes
It makes no sense to report an issue if you are not willing to co-operate.
So please answer my question or your posting will be removed.

German ~Z~ Man Replied 1 week ago

I agree the installer could be more foolproof, and this is already on the to-do list for a future release. Until then, the only thing I can do is keep repeating: Guys, read the documentation!

Because this IS in fact mentioned in
https://www.opensource-socialnetwork.org/wiki/view/2006/how-to-install-and-update-components

us Bryce alvord Replied 1 week ago

Good point Z-Man, you do have to delete the old component before installing the new one. This is true in general and doesnt delete data associated with the component, just deletes the files and entry in the db.

Distracted Thought: What if the cominstaller actually installed the component to a temp directory to make sure it would install successfully (aka, its a valid package), then deleted the original component directory by the same ID, and finally renamed the temp directory from tempComponentName to ComponentName completing the circle in one step making it an upgrade if installed process too.

us Bryce alvord Replied 1 week ago

new version uploaded!

German ~Z~ Man Replied 1 week ago

Did you remove the former release before trying to install 1.9?

"Upload error"? Please tell us the exact error message and/or provide your error log.

se Johannes Genberg Replied 1 week ago

I wasn't able to install 1.9. It gives me an upload error.

German ~Z~ Man Replied 2 weeks ago

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_.....' :)

us Bryce alvord Replied 2 weeks ago

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

German Arsalan Shah Replied 2 weeks ago

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.

Component

Developer: bryce
License GPL v2
Type: Communication
Ossn Version: 5.x
Latest Version: 1.9.1
Last Updated 1 week ago
Repository Url View Repository

Versions