let only site members see the search box in header

Hi,

Please can someone show me how to let only site members (logged in) see the search box in header (top left)?

Thanks

 

 

 

 

Quote · 10 Jul 2013

Hello

You need to edit templates/base/scripts/BxBaseFunctions.php file -> genSiteSearch function and add the following code at the very beginning (just after ({) sign).

if(!isLogged())
   return '';

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
Quote · 10 Jul 2013

great! a perfect fix for this. thanks so much

but do you think it can be put into  php block? any materials on the wiki in this regard?

 

 

 

 

Quote · 10 Jul 2013

Hello

You are welcome. :)

I cannot find anything like this in Dolphin Wiki. However it's not so had. You need:

1. Execute the following MySQL query

INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`, `Cache`) VALUES
('index', '1140px', 'Site search', '_site_search', 2, 1, 'PHP', 'global $oFunctions; return $oFunctions->genSiteSearch();', 1, 28.1, 'non,memb', 0, 0);

 

2. Add something like this in templates/base/css/index.css file.

div.disignBoxFirst div#sys_search_wrapper {
padding: 20px 0px;
}
div.disignBoxFirst div#sys_search {
position: relative;
top: 0px;
left: 0px;
margin-right: 20px;
}

 

3. Add translation for _site_search key via admin panel -> settings -> languages settings.

4. Move newly created block in necessary location via admin panel -> builders -> pages builder -> homepage. It's essential because cache should be recreated.

That's all. You may test. 

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
Quote · 11 Jul 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.