Could there be a way to batch remove read notifications? If users don't manually remove them as they're read (and they won't), the database will continue filling with them, needlessly taking space. Perhaps this should be weekly forum maintenance?
A better way to "detect" read notifications would be handy (e.g. mark them as read when the message is read irrespective of how the user reach the message), though nobody managed to make it become reality.
A scheduled task I guess it would work, the "main code" would be something like:
$mentions = getAllMentionIDsYouWantToMarkAsRead();
require_once(CONTROLLERDIR . '/Mentions.controller.php');
$mentions = new Mentions_Controller();
foreach ($mentions as $mention_id)
{
$mentions->setData(array(
'id_mention' => $id_mention,
'mark' => 'read',
));
$mentions->action_markread();
}
getAllMentionIDsYouWantToMarkAsRead is of course just a dummy function that require an actual implementation.