Jayant and I collaborated on the development of a MyBB plugin. It enables MyBB based forums to send out email notifications to users when their username is referenced in a post – preceded by the @ character. Of course, users have to opt in to receive such notification. So the plugin adds a checkbox to the User CP for this purpose.
This is how someone will reference the username in a post. This will not work for usernames with spaces and special characters. For handling these cases, the regex used in the get_users_to_notify() function will need improvement.
@jayant Hi this is a test post
This is the email notification that is sent to the user
jayant, abhijeet has just referenced you in a post on MyTestForum. To view the post, you can go to the following URL: http://localhost/mybb/showthread.php?tid=1&pid=14#pid14 Thank you, MyTestForum Staff
You can download the plugin here. Extract the archive and copy urnotification.php to the inc/plugins folder. You can then enable it from the Admin Control Panel.
We referred the source of gtalk profile plugin by ssmol while developing this one. The “debugging” environment was NetBeans 6.8 with PHP bundle, XAMPP 1.7.3 and MyBB 1.4.11.