Member_replies is a project mainly written in PHP, it's free.
This field works with the Members extension and tracks which entries members have read. More specifically, it assumes a parent/child relationship such as Articles/Comments or Forum Threads/Replies and it will monitor how many replies each member has read. With this field you can build a rudimentary forum system.
XML output:
<replies has-read-before="no" total-replies="1" unread-replies="1">
<latest id="170" time="19:28">2011-06-16</latest>
</replies>
has-read-before
if the user has previously viewed this thread. If they have, and there are unread replies you will want to write "X unread" into your viewtotal-replies
is the total number of child entries (comments, replies etc)unread-replies
is the number of these child entries that the member has not readlatest
represents the latest child entry and contains its creation datelatest/@id
is the ID of the latest child entry (also included as an output parameter)latest/@time
is the date of the latest child entry, for "time ago" processingThe field also provides a "mark as read" data source output mode. Choose this option on the "detail" view of your parent entry (e.g. the page that displays the full discussion thread). This does the action of marking the latest reply as "read" for this logged-in member.
To filter the field you must be sorting by the field also. It is a requirement of the SQL joins.
When filtering by the field, pagination does not work. The SQL required for filtering entries is not applied to the SQL that performs the pagination counting, so the pagination numbering will be incorrect. It is advisable that if you filter by unread
then you also disable pagination. Perhaps just show the latest 25, 50 or 100 entries. Sorry.