Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

About me first tab

This discussion is related to the AboutMe addon.
edited July 2011 in Vanilla 2.0 - 2.3
I read in plugin's default.php that I could make 'About me' to be the first tab.
Putted first code in class.profilecontroller.php, but where do I put the second code:
public function ProfileController_AddProfileTabs ...

Sorry, I'm kinda noob. I don't know how to do it :(

Comments

  • Its no problem, at least you have the courage to try, that's how I made this ;-)

    You either replace line 28 of default.php, or simply add 'Before' in the middle. The name of the function determines where your plugging into. :-)

    Now we just need to ask @Todd @Tim or @lincoln to add the BeforeAddProfileTabs fire event to the profile controller so that its not erased when we update. :0)
  • Hello. I got the AboutMe tab to show as the first one, but the 'Activity' tab, now in the second position, is the one that is highlighted as active and displayed when I enter this section.

    Is there any way to have the AboutMe tab be the one that viewers land on when accessing the profile section?
  • Hello. I got the AboutMe tab to show as the first one, but the 'Activity' tab, now in the second position, is the one that is highlighted as active and displayed when I enter this section.

    Is there any way to have the AboutMe tab be the one that viewers land on when accessing the profile section?

    I'm wondering this too as it would be ideal to land on the profile page with the About Me" tab selected and loaded (instead of "Activity") when someone clicks on a user.

  • anamaria said:
    Is there any way to have the AboutMe tab be the one that viewers land on when accessing the profile section?

    I'm looking for an answer to this question, too. Can anyone tell us how this is done, please?

    Thanks!

  • peregrineperegrine MVP
    edited February 2012

    I'm no expert but I had a look at the code

    /vanilla/library/core/functions/render.php

    around line 159
    the Anchor for the user is setup around line 159

    change /profile/ to /profile/aboutme/

    </p> <pre><code> return '<a href="'.htmlspecialchars(Url('/profile/aboutme/'.($NameUnique ? '' : "$UserID/").rawurlencode($Name))).'"'.$CssClass.'>'.htmlspecialchars($Name).'</a>';

    I know there is a proper way to do this, but this is the brute force way I got to do what you want. Points all instances of username to the AboutMe tab instead of Activity Tab

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

  • edited February 2012

    Add this lines to forum's config.php:

    $Configuration['Garden']['ProfileTabOrder'][] = 'aboutme';

    $Configuration['Garden']['ProfileTabOrder'][] = 'Notifications';

    $Configuration['Garden']['ProfileTabOrder'][] = 'Activity';

    $Configuration['Garden']['ProfileTabOrder'][] = 'Discussions';

    $Configuration['Garden']['ProfileTabOrder'][] = 'Comments';

    or you can add only one line:
    $Configuration['Garden']['ProfileTabOrder'][] = 'aboutme';

  • Yes, thank you @Serg

    Sorry guys been really busy lately.

    At the time of writing this plugin, I was not sure how to use the configuration for link arrangement.

    It seems that almost every list in the core of Garden can be sorted in the config menu, I will likely add this as a configuration option in the next version.

Sign In or Register to comment.