1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Filter out currently logged in users activity from their recent activity feed

Discussion in 'XenForo Suggestions' started by RobinHood, Sep 22, 2016.

  1. RobinHood

    RobinHood Well-Known Member

    It doesn't really make sense to include the activity for the logged in user in this feed.

    If you've recently been busy on the forum it just clogs it up by telling you everything you've just been doing, which I doubt that user is interested in.

    Mouth likes this.
  2. James

    James Well-Known Member

    It's an interesting view and smaller forums probably suffer from this more than bigger ones where there is a constant flurry of activity. Perhaps an option to consolidate multiple "activity" instances. "RobinHood liked Alfa1's post and ichpen's post in threads x and Y" or "RobinHood liked posts [...]" with a drop-down.

    I can't say I've ever been concerned by this but as each activity is an individual instance I doubt consolidation is that simple.
  3. RobinHood

    RobinHood Well-Known Member

    Yeah, definitely more obvious on smaller forums. But small or large, I'm still not sure activity about the logged in user is ever useful or relevant to that user in this feed.

    Surely this page is about discovering new content, not look at a summary of what you've just finished doing.

    If they really want to look at themselves they can look at the recent activity feed tab on their own profile.
  4. James

    James Well-Known Member

    Ahh your suggestion is to remove your own activity from your own global feed?

    You can do this via an edit in news_feed_item and just wrap the whole template in:
    <xen:if is="{$visitor.username} !== {$item.username}">
    // template contents here
    Should work?
    RobinHood likes this.
  5. RobinHood

    RobinHood Well-Known Member

    Ohh! Amazing! Cheers James,

    It wasn't the whole template, but this bit of code in the template that I needed to wrap it around

                <xen:include template="news_feed_item">
                    <xen:set var="$itemTemplate">{xen:raw $item.template}</xen:set>
                    <xen:set var="$itemDate">{$item.event_date}</xen:set>
    That cleans it up considerably.

    Only slight issues is that if the first page of items are all you, then nothing will be displayed and you have to click Show older items

    With each click, instead of getting a full page of 15 results sometimes you only get 1 or 2 new results or 0 depending on how many of the items on that page belong to you.

    Any ideas on how to get it so that all 15 results appear with each click?
  6. James

    James Well-Known Member

    You'd need to dig into the code to remove your own information from the $newsFeed variable altogether as, technically, they still exist in there we're just choosing not to display them.

    Still makes for a valid suggestion though :)
    RobinHood likes this.
  7. RobinHood

    RobinHood Well-Known Member

    Sweet, might have a play with that.

    That'll do me for now though, cheers! :)

Share This Page