Notifications
Clear all

How to access the Highlight Unread messages feature

6 Posts
3 Users
0 Reactions
1,263 Views
(@alex_prome_media)
Active Member
Joined: 5 years ago
Posts: 8
Topic starter  

How is wpDiscuz flagging comments to the user which are "unread"? I would like to access the same information so that I can show a notification count to the user on an another page which leads to my custom post type, that will indicate the number of unread comments.


   
Quote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6193
 

It's stored in the cookies. So for each post there is stored the comment date when last time the user saw it.


   
ReplyQuote
(@alex_prome_media)
Active Member
Joined: 5 years ago
Posts: 8
Topic starter  
Posted by: @astghik

It's stored in the cookies. So for each post there is stored the comment date when last time the user saw it.

This comment date is stored only as a cookie? Or in the DB?


   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6193
 

@alex_prome_media,

This comment date is stored only as a cookie? 

yes, it's stored only as a cookie. 


   
ReplyQuote
(@alex_prome_media)
Active Member
Joined: 5 years ago
Posts: 8
Topic starter  

Great! What would be the name of the cookie? Is it something I can access using one of the cookie funcitons? I would like to tally the number of unread comments for a specific post type for the user, and display the number of unread.


   
ReplyQuote
Elvina
(@elvina)
Support
Joined: 5 years ago
Posts: 1403
 

Hi @alex_prome_media,

The hook name is: 

wpdiscuz_last_visit

It saves the data for each post(when that last time the certain users visited each post).


   
ReplyQuote
Share:
Scroll to top