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.

How to set Discussion as default tab on member profile?

Hi, by default when you view a member profile. The default tab is "Activity".
How can I set the "Discussion" as default tab? And how can I disable the activity from displaying.
I only want to display Discussions and Comments tab on member profile. Thanks. I'm using Vanilla 2-0-18-8

Comments

  • Well do you just want to change the link to point that page?

    Other then that the simple way has some flaws becuase it relies on rewrites, which means you must know the pages to differentiate them from the plain user, if have pluign which add tabs this could complicate things.

    The more complicated way would require some development.

    grep is your friend.

  • x00x00 MVP
    edited August 2013

    in /dashboard/routes add route

    • Route Expression ^profile/(?!(discussions|notifications|activity|comments|\d+))[^/]+/?$
    • Target profile/discussions
    • Type Internal

    Only problem is if any addon adds methods to the profile controller, you will need to exclude that method from in the negative loookup.

    so for instance if thre was a profile/worth page you would need to change the
    (discussions|notifications|activity|comments|\d+) bit to (worth|discussions|notifications|activity|comments|\d+) and so on.

    It is not affected by plugins who use an url scheme like profile/123/something becuase it already ignore numerical argument in that place. It also ignore anything after the first argument so if you were to do /profile/foo/bar it would not be directed to discussions.

    grep is your friend.

    R_JShadowdare
  • Thank you for the reply sir.
    I tried your solution. It worked but the result is different from what I wanted to achieve.
    When I view a user's profile. It is my discussions, notifications that are displayed there.

    I wanted something like this.
    When other users view JohSmith1 profile, his profile should display all tabs except "Activities".
    How do I do that? What PHP file should I edit? And what code block should I comment out?

Sign In or Register to comment.