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.

set default profile tab

ChiOneChiOne New
edited June 2012 in Vanilla 2.0 - 2.8

How to set default profle tab? Now i have Notifivation.

Is there such Config? Or i must use a hook?. Is there a document where i can see all of items that i can configure through conf?

Best Answer

  • x00x00 MVP
    edited June 2012 Answer ✓

    Very good question. I had a look at the controller and you would have to do this with redirects.

    Got to /dashboard/routes and "Add Route"

    Route Expression

    ^profile(/(?!activity|notifications|discussions)([0-9]/)?[^/]*?/?)$

    Target

    profile/discussions$1

    Type

    Internal

    Note that example redirects to discussions.

    grep is your friend.

Answers

  • x00x00 MVP
    edited June 2012 Answer ✓

    Very good question. I had a look at the controller and you would have to do this with redirects.

    Got to /dashboard/routes and "Add Route"

    Route Expression

    ^profile(/(?!activity|notifications|discussions)([0-9]/)?[^/]*?/?)$

    Target

    profile/discussions$1

    Type

    Internal

    Note that example redirects to discussions.

    grep is your friend.

  • Oh, routes! Thanks! )

  • fh111fh111 ✭✭

    @x00

    interesting. what do you mean by "i had to look at the controller"? how do i look at the controller? i am using your (awesome!) plugin 'myprofile' and now that i know i can change this i would like to redirect it to the "About User" tab.

  • vanilla/library/core/class.router.php should give you some ideas on how to create the route expression.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • fh111fh111 ✭✭
    edited June 2012

    x00 said:
    Very good question. I had a look at the controller and you would have to do this with redirects.

    Got to /dashboard/routes and "Add Route"

    Route Expression

    ^profile(/(?!activity|notifications|discussions)([0-9]/)?[^/]*?/?)$

    Target

    profile/discussions$1

    Type

    Internal

    Note that example redirects to discussions.

    @x00
    just want to let you know that since i put in this route many profile links did not work anymore. noticed when a community member let me know today that when clicking the link to upload/change a profile picture it said 'page could not be found' .. same for other profile-links.. (like change password)

  • try

    ^profile(/(?!activity|notifications|discussions|edit|password|invitations)([0-9]/)?[^/]*?/?)$

    grep is your friend.

  • fh111fh111 ✭✭

    oh i did not notice your reply until now. thanks! will try in a week when i'm back online

Sign In or Register to comment.