Show (count) new entries in groups

Hi,
I am searching for a solution to count the newest entries in a group. I already have now a menu of the groups I am a member. It would be nice to see in the menu if there are new entries..
Just like the behaviour Facebook offers for the groups.
example:
- GroupOne (3)
- CoolGroup (134)
- AnotherGroupname (56)

Any Idea (Can't find anything using google ;-)
Kind regards
Markus Söth
 

  • I'm going to assume by "entry" you mean new ElggObjects in a group, and by "new" you mean "things I haven't viewed".

    This going to be difficult because Elgg doesn't keep track of things "viewed" by individual users; you'll have to record all that. When a group-contained entity is created, make a relationship called "unviewed{$group_guid}" between the entity and the group's members (you'll probably want to use a direct DB query for this). When a user "views" the entity (however you define that), you'll remove the relationship. And also make a cron job that deletes these relationships over N months old. 

    But that would give you a way to count unread for each group displayed.

    Could be a useful plugin!

  • Hi @Steve Clay,
    thanks for your support. Ok.. this looks like a bigger job...
    So I will put that in the qeue..

    But you are right .. could be usefull especially for people who don't show up evry day
    Kind regards
    Markus

     

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking