Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 8

CurtisOdenTorbjornericgillette +5 guests

About me first tab

This discussion is related to the AboutMe addon.
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 :(
Tagged:

Comments

  • Posts: 164 Accepted Answer
    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)
  • Posts: 17
    thanks man :)
  • Posts: 164
    No problem :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?
  • anamaria said:

    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.

  • Posts: 4

    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!

  • Posts: 717

    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/

      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

    Don't bite the many hands that feed you. Are you finding certain Documentation lacking, fix it, and add to it at the wiki site.

  • Posts: 1

    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';

  • Posts: 164

    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.