How to add submenu to Member menu?

How can i add a new "item" in the member menu with a submenu?
I want to put 4 links in the submenu ( edit profile, logout, help, privacysettings )

I've set my own icons incept of the standard Boonex icons but they are cropped to 16px x 16px with this code:
<img class="" width="16" border="0" height="16" alt="" src="http://www.u2me.nl/templates/base/images/icons/admin.png">

If i go to base/extra_top/menu.html i only find this:
__menu_image__

Where can i edit the width and height of the image?

menu.png · 6.3K · 246 views
Quote · 5 May 2013

The problem with the width of the icons is solved only want to know how to make a new item with submenu.

Quote · 6 May 2013

Please post the solution for the icons so that others searching the forums in the future will have the information.

Geeks, making the world a better place
Quote · 6 May 2013

Submenu items are not supported in the builders.  The menu was not designed to support submenu items.

Geeks, making the world a better place
Quote · 6 May 2013

Ok. So it's been awhile since i had done this. So i had to relearn.

To add a popup menu for a member menu item is a little complex.

First create a menu item in the member menu which i think you have already done.

Now create a function for the popup menu. Add this code to the bottom of inc/classes/BxDolMenu.php just before the last closing brace }

    function get_my_submenu() {
        $iProfileID = (int)$_COOKIE['memberID'];

        $aTemplateKeys = array (
            'edit_profile_link' => BX_DOL_URL_ROOT . 'pedit.php?ID=' . $iProfileID,
            'edit_profile_text' => _t('_Edit Profile'),
            'logout_link' => BX_DOL_URL_ROOT . 'logout.php',
            'logout_text' => _t('_Log Out'),
            'help_link' => BX_DOL_URL_ROOT . 'help.php',
            'help_text' => _t('_HELP_H'),
            'privacy_link' => BX_DOL_URL_ROOT . 'member_privacy.php',
            'privacy_text' => _t('_ps_pcpt_privacy_settings'),
        );

        $sOutputCode = $GLOBALS['oSysTemplate'] -> parseHtmlByName( 'my_menu.html', $aTemplateKeys );
        return $sOutputCode;

    }

Now in templates/base create a new template file named my_menu.html. And in that file place this.

<div class="control">
    <div>
        <i class="sys-icon cog" title=""></i>
        <a href="__edit_profile_link__">__edit_profile_text__</a>
    </div>
    <div>
        <i class="sys-icon tasks" title=""></i>
        <a href="__logout_link__">__logout_text__</a>
    </div>
    <div>
        <i class="sys-icon question-sign" title=""></i>
        <a href="__help_link__">__help_text__</a>
    </div>
    <div>
        <i class="sys-icon dashboard" title=""></i>
        <a href="__privacy_link__">__privacy_text__</a>
    </div>

</div>


Now in phpMyAdmin in the table sys_menu_member find your menu item. Edit that item and in the field named PopupMenu add this code which will call the popup when clicked.

bx_import( 'BxDolMenu' );
return BxDolMenu::get_my_submenu();


Now clear the dolphin cache. That should be it.

The template is setup to use the new 7.1 icons, but you can change that template to adjust how the menu looks.




https://www.deanbassett.com
Quote · 6 May 2013

Make an div id and set in your css ... ( div id ) img { width:auto !important; height:auto !important;

Quote · 6 May 2013

 

Make an div id and set in your css ... ( div id ) img { width:auto !important; height:auto !important;

 Not understanding what your asking here.



https://www.deanbassett.com
Quote · 6 May 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.