members / non-members

Hello everybody,

page_1.html displays homepage. I noticed if member is logged in you can specify what to display in the body.

I need to hide "sys_top_menu" container for non-members and show it to the members, how would I do it?

How can I remove search icon from that container?

Thank you!

http://www.magento-templates.com/ - Magento Templates for eCommerce websites
Quote · 7 Jan 2010

anybody?

http://www.magento-templates.com/ - Magento Templates for eCommerce websites
Quote · 7 Jan 2010

Those kind of changes cannot be made from in any of the html files.

I am not sure how to remove the search icon. I will have to look into it.

Also dolphin was not designed to hide the entire menu for members that are not logged in. That will require a source code mod.

I have written a quick hack that will hide the menu for those not logged in.

inc\classes\BxDolTemplate.php at around line 698

Change this.

case 'top_menu':
$sRet = $GLOBALS['oTopMenu'] -> getCode();
break;

To This.

case 'top_menu':
if ((int)$_COOKIE['memberID'] > 0) {
$sRet = $GLOBALS['oTopMenu'] -> getCode();
} else {
$sRet = '<style>.sys_top_menu {display: none}</style>';
}
break;


There are 2 ways to do it. This one hides the entire menu and the background image behind the bar by hiding sys_top_menu.

The other method is to hide the menu, but leave the background image.

In that case, use this code instead.

case 'top_menu':
if ((int)$_COOKIE['memberID'] > 0) {
$sRet = $GLOBALS['oTopMenu'] -> getCode();
} else {
$sRet = '';
}
break;



With this, any one not logged in will not see the menu at all, on any of the pages.


EDIT. Just corrected a mistake in my second code example.

https://www.deanbassett.com
Quote · 7 Jan 2010
 
 
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.