I have replaced the Mingle forum header with a small sidebar widget that has links to:
(where user_id is appropriately adjusted)
(where id is appropriate to the logged in user)
The first of these links loads a table showing new posts, exactly as the equivalent link does in the default Mingle Forum header.
What I would really like is a way to gray out this link if there are no new posts, and change the mouseover text to indicate the number of new or unread posts. This would save the user from clicking the link only to find there are no new posts.
I suspect the answer is somewhere in mingle-forum/wpf.class.php but going through someone else's code is tricky. I assume I would need to go through the same process Mingle uses to create the table, but count the number of new posts instead of outputting them into a table.
Can anyone here provide some guidance? Is there some pre-written WordPress code I could use to get number of posts since a certain date/time?