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 can I directly edit the MeBox? (2.1b)

ZhaanZhaan Professional fool ✭✭

I want to add a custom button/icon to the user menu (MeBox), but I'm not sure where the file/template is located. Can anyone help me out?


  • Options
    ZhaanZhaan Professional fool ✭✭
    edited August 2013

    Ah, could it be /applications/dashboard/views/modules/me.php?

    EDIT: Yes, that appears to be the case! But now I have another problem - how can I prevent the new button from opening inside a popup window?

    This is what I've done so far:

    // New Topic if (Gdn::ApplicationManager()->CheckApplication('Vanilla')) { echo '<span class="ToggleFlyout" rel="/post/discussion">'; echo Anchor(Sprite('SpBookmarks', 'Sprite Sprite16').Wrap(T('Bookmarks'), 'em'), '/discussions/bookmarked', 'MeButton FlyoutButton', array('title' => T('New Topic'))); echo Sprite('SpFlyoutHandle', 'Arrow'); echo '<div class="Flyout FlyoutMenu"></div></span>'; }

  • Options
    ToddTodd Chief Product Officer Vanilla Staff

    You are correct with the location. And as with all views you can override it in your own theme without editing core files. Just copy the me.php to: /themes/yourtheme/views/modules/me.php

  • Options
    ZhaanZhaan Professional fool ✭✭
    edited August 2013

    Ah, I had no idea you could do that. Thanks a lot!

    If anyone's interested, I managed to come up with a solution. I copied the Bookmarks code and edited it. Also made some additions to my custom.css.

    // NewTopic
             if (Gdn::ApplicationManager()->CheckApplication('Vanilla')) {
                echo '<span rel="/post/discussion">';
                echo Anchor(Sprite('SpTopic', 'Sprite Sprite16').Wrap(T('Discussion'), 'em'), '/post/discussion', 'MeButton FlyoutButton', array('title' => T('New Topic')));
  • Options

    @Zhaan said:

    nice followup.

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

Sign In or Register to comment.