Mar 24
MyBB Username Reference Notification Plugin
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.
Screenshot of the extra option added to User CP
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 postThis 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 StaffYou 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.

March 25th, 2010 at 10:16 am
Why not you submit this to mybb plugin category so that people can try it out and give comments? More visibility that way.
March 29th, 2010 at 11:30 am
Good idea Mac! Will try this.
March 1st, 2011 at 10:52 am
Can you provide me with info on how to have this automatically enabled when new users register?
March 1st, 2011 at 10:54 am
Have you by chance gotten this to work with users names that have spaces?
March 7th, 2011 at 10:30 pm
Hi djdoubt3,
Thanks for dropping by. For handling usernames with spaces and other special characters, you need to change the regex “/@(\w+)/i” in get_users_to_notify() to something that can handle such input which is enclosed within delimiters.
To have this automatically enabled for new users, you can modify the alter table statement in urnotification_activate() function to set the default value to 1.
I did not have the chance to work on this anymore but I hope the above works for you.