Stackoverflow-like notifications on your Question2Answer forum that can replace all email-notifications.
Follow these steps:
q2apro-on-site-notifications
from the ZIP file.q2apro-on-site-notifications
to the qa-plugin
folder of your Q2A installation.q2apro-on-site-notifications
into the qa-plugin folder of your server.It is possible to generate custom notifications from other plugins that will be displayed in the notification list. To do so, an event
needs to be fired with the q2apro_osn_plugin
event id and with the following parameters:
plugin_id
: ID of the plugin that generated the event. It is not used by the notifications plugin but it is added to the table
in case an efficient query needs to be run against the table that contains the plugin notificationsuser_id
: The user ID that will receive the notificationevent_text
: The raw HTML that will be displayed as the notificationicon_class
: A CSS class that must be present in every request that could display the notificationqa_report_event('q2apro_osn_plugin', qa_get_logged_in_userid(), qa_get_logged_in_handle(), null, array(
'plugin_id' => 'my_plugin_id',
'user_id' => $receiverUserId,
'event_text' => '<a href="http://site.com/user/user1">user1</a> mentioned you in <a href="http://site.com/154">this post</a>',
'icon_class' => 'my_plugin_id_and_css_class',
));
The code is probably okay for production environments, but may not work exactly as expected. You bear the risk.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
All code herein is OpenSource. Feel free to build upon it and share with the world.