Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Display Unread Post+Comment Count instead of Total Comment Count in category sidebar?
yourfavorite
New
Instead of listing the number of posts/comments next to the category names in the sidebar (not super useful for active users imo), I'd rather display the number of unread posts+comments for the user. I tried looking through the $Category object in categories.php but it doesn't seem to have the info I want. Any help?
0
Comments
iirc it doesn't keep track of unread post/comments on a per-category basis
it would be a major performance killer I would think to try to track this on a category basis.
from what I seem to recall it was all calculated from the userdiscussion table.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
A bit of a bummer UX wise, but if that's the case is there at least a way to find out if a category has unread content? I'd at least be able to visually differentiate categories with new content.
if you look at categories controller - categories page.
you can see categories have a css class read or unread.
you would need to retrieve that and apply that to the category box panel somehow.
you would need to change the css
clone the module write plugin - might be a better way than this. but its an idea.
https://github.com/vanilla/vanilla/blob/release/2.1/applications/vanilla/views/modules/categories.php#L30
add a line like this below in cloned module.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
you could copy the categories.php
to
yourtheme/views/modules/categories.php
and change
echo Anchor(htmlspecialchars($Category->Name).$CountText, CategoryUrl($Category), 'ItemLink');
to
HasNew should alread have some css setup.
you said you didn't want counts and wanted "New"
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Awesome! Thanks @peregrine I'll give this a shot!