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)
Zhaan
✭✭
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?
0
Comments
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>'; }
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
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.
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.