MyBB Community Forums

Full Version: How create {$mymenu} like {$header} and others
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I would like add a menu in all pages of usercp (homepage usercp, edit avatar, edit sign, edit profile, options, private etc).

But each time re-add style, code html, javascript etc I think it's not good..If then I'll want edit a color of menu, for example, I'll have to change many templates.

I would like to know how add a thing as {$mymenu}, in this way I edit always and only template and theme in {$mymenu}. If there's a tutorial on mybb for example.

Thank you in advance for the help and sorry for my English
this thread should give you the idea....
It doesn't work Sad

- Created new PHP page: ucpmenu.php
- Inside ucpmenu.php added this code:


define('IN_MYBB', 1);
require "./global.php";

eval("\$ucpmenu = \"".$templates->get("ucpmenu")."\";");

(tried with output_page($ucpmenu);   and   without output_page($ucpmenu); )

- Then created, in templates, new template called "ucpmenu"
- In ucpmenu added <style>, <script>, html etc for menu
- Added {$ucpmenu} in usercp template, after {$header}

..but menu doesn't appear Sad Where I wrong?

Ok, nothing, I have resolved changing directly {$usercpnav} template Big Grin