News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Where is the Profile Menu called? (Profile Info, Modify Profile, Actions)

Started by profzelonka, February 25, 2017, 12:49:58 AM

Previous topic - Next topic

profzelonka

Example:
http://www.simplemachines.org/community/index.php?action=profile
Under breadcrumbs, there's a profile menu.

I simply want to move this menu to a lower part of my custom profile template, but I can't find what file it's being called from, even with notepad++.

Could I somehow call for it wherever in Profile.template.php? Or reconstruct it altogether may be even better, whichever is possible..

Arantor

It's not that simple, it really isn't.

The profile menu is generated from the main profile code by the calls in Profile.php out to the code in Subs-Menu.php, it might be called createMenu, it's been a while since I looked.

Anyway, the same code is used by the profile, the moderation and the admin menus, so you potentially end up affecting those areas too with the changes you want to make.

What exactly are you trying to achieve with the profile menu?

profzelonka



(Trying to have the profile start with the user info, and then have the menu under it.)

It's probably too complex of an option, but I wouldn't mind to generate the menu in that specific place below in full code, that way I have more control of what links it'll show and how. Of course just moving it would be a solution.

If any of this is possible without too much of a hassle..

Arantor

None of this is possible without significant hassle because, as already outlined, the profile menu ties into the generic menu system as reused elsewhere.

If that weren't enough, the profile code definition for the menu (i.e. what links are shown) also get tied into various permissions and options based on what is enabled and whether this is something relevant to the current user or not (since there are things relevant to only the user whose profile it is, things relevant to admins looking at other users' profiles and not their own etc)

Oh, and that doesn't account for the fact that there are two different menu layouts, one that is a sidebar and one that is a dropdown menu...

profzelonka

Yeah, that's unfortunate. (I disabled the sidebar toggle (manually) so no worries on that issue at least. lol)

Thanks for answering and explaining.

Advertisement: