Code removal

Hi all, I am trying to remove a line of code (see screenshot) I can't find the proper template file to remove this..can anyone guide me please.

 

Thanks

Mike
Quote · 8 Sep 2015

Easiest method would be to edit top_menu.css and look for:

 

div.sys_sub_menu {

 

And add:

 

display: none;

 

So for example:

 

div.sys_sub_menu {
        margin: 0px auto;
        display: none;
}

 

Addition in red. Then save and clear Dolphin's cache. You may want to make these edits in a custom template, as top_menu.css may be overwritten after an upgrade.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 8 Sep 2015

  Wow Thank you so much !!!! it worked really nice of you

 

 

 

 

 

Easiest method would be to edit top_menu.css and look for:

 

div.sys_sub_menu {

 

And add:

 

display: none;

 

So for example:

 

div.sys_sub_menu {
        margin: 0px auto;
        display: none;
}

 

Addition in red. Then save and clear Dolphin's cache.

 

Mike
Quote · 8 Sep 2015

 Can I make this menu only visible for Admin ?

Easiest method would be to edit top_menu.css and look for:

 

div.sys_sub_menu {

 

And add:

 

display: none;

 

So for example:

 

div.sys_sub_menu {
        margin: 0px auto;
        display: none;
}

 

Addition in red. Then save and clear Dolphin's cache. You may want to make these edits in a custom template, as top_menu.css may be overwritten after an upgrade.

 

Mike
Quote · 9 Sep 2015

 

Can I make this menu only visible for Admin ?

Yes, but this can't be done via CSS. Edit /templates/base/scripts/BxBaseMenu.php and look for:

 

        //--- Submenu Menu ---//
        $this->sCode = '';
        if(!defined('BX_INDEX_PAGE') && !defined('BX_JOIN_PAGE'))
            $this->genSubMenus();

 

Replace this code with:

 

        //--- Submenu Menu ---//
        $this->sCode = '';
        if(!defined('BX_INDEX_PAGE') && !defined('BX_JOIN_PAGE'))
            if($GLOBALS['logged']['admin']) {
                $this->genSubMenus();
            }

 

Additions in red. Save and clear Dolphin's cache (also undo that CSS change). This will hide the submenu for non-admins. As always, it's best to make these changes in a custom template.

 

But TBH, I don't know why you'd want to hide the submenu for non-admins. Doing this will make the site much more confusing and harder to use for regular members.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 10 Sep 2015

 Thank you again Nathan, I attached a screenshot for you on your question...BTW it is working great your code..

 

 

Can I make this menu only visible for Admin ?

Yes, but this can't be done via CSS. Edit /templates/base/scripts/BxBaseMenu.php and look for:

 

        //--- Submenu Menu ---//
        $this->sCode = '';
        if(!defined('BX_INDEX_PAGE') && !defined('BX_JOIN_PAGE'))
            $this->genSubMenus();

 

Replace this code with:

 

        //--- Submenu Menu ---//
        $this->sCode = '';
        if(!defined('BX_INDEX_PAGE') && !defined('BX_JOIN_PAGE'))
            if($GLOBALS['logged']['admin']) {
                $this->genSubMenus();
            }

 

Additions in red. Save and clear Dolphin's cache (also undo that CSS change). This will hide the submenu for non-admins. As always, it's best to make these changes in a custom template.

 

But TBH, I don't know why you'd want to hide the submenu for non-admins. Doing this will make the site much more confusing and harder to use for regular members.

 

lib.png · 169K · 196 views
Mike
Quote · 10 Sep 2015
 
 
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.