How remove the search block for GUEST?

Hi, I try to make a secret website with NOTHING to see for guest...  for now the only problem i have is the SEARCH block at the header of the page... even if you are guest you can search and see the result...   i set search for member only in the membership level permission.... but non member can still do a search and see result...

i only want that this search block appear for member

someone can help me?

 

 

thx

Quote · 21 Jan 2014

You could remove that search and just let members use the other search.

Geeks, making the world a better place
Quote · 21 Jan 2014

Run the following query in phpMyAdmin.

UPDATE `sys_injections` SET `data` = 'if((int)$_COOKIE[''memberID''] > 0) return $GLOBALS[''oFunctions'']->genSiteSearch();' WHERE `name`='site_search';

Then clear the dolphin cache.

https://www.deanbassett.com
Quote · 21 Jan 2014

thx deano :)

Quote · 22 Jan 2014

 

Run the following query in phpMyAdmin.

UPDATE `sys_injections` SET `data` = 'if((int)$_COOKIE[''memberID''] > 0) return $GLOBALS[''oFunctions'']->genSiteSearch();' WHERE `name`='site_search';

Then clear the dolphin cache.

 Hi i can't get this working :(

phpMyAdmin/UPDATE `sys_injections`

 

I insert this code where it say data?

 

SET `data` = 'if((int)$_COOKIE[''memberID''] > 0) return $GLOBALS[''oFunctions'']->genSiteSearch();' WHERE `name`='site_search';

 

?

 

Quote · 23 Dec 2015

 

 

Run the following query in phpMyAdmin.

UPDATE `sys_injections` SET `data` = 'if((int)$_COOKIE[''memberID''] > 0) return $GLOBALS[''oFunctions'']->genSiteSearch();' WHERE `name`='site_search';

Then clear the dolphin cache.

 Hi i can't get this working :(

phpMyAdmin/UPDATE `sys_injections`

 

I insert this code where it say data?

 

SET `data` = 'if((int)$_COOKIE[''memberID''] > 0) return $GLOBALS[''oFunctions'']->genSiteSearch();' WHERE `name`='site_search';

 

?

 

 
And what version of dolphin are you trying this with?

Boonex has changed the search in dolphin 7.2. This most likely will not work with that version. I have not had time to look for another way.

https://www.deanbassett.com
Quote · 24 Dec 2015

Ic. got version 7.2

 

thank you

Quote · 24 Dec 2015

Why not try a DB query for "site_search" in some of the tables, see if you can find a similar thing in 7.2 as Daeno posted for the older version.

 

Ic. got version 7.2

 

thank you

 

Quote · 24 Dec 2015

 

Why not try a DB query for "site_search" in some of the tables, see if you can find a similar thing in 7.2 as Daeno posted for the older version.

 

Ic. got version 7.2

 

thank you

 

 
There isn't. It's no longer in the database. It's handled by a template key now. So it now requires code changes to get the desired results.

https://www.deanbassett.com
Quote · 24 Dec 2015

 

 

Why not try a DB query for "site_search" in some of the tables, see if you can find a similar thing in 7.2 as Daeno posted for the older version.

 

Ic. got version 7.2

 

thank you

 

 
There isn't. It's no longer in the database. It's handled by a template key now. So it now requires code changes to get the desired results.

Thanks deano u saved me a lot of time here.

Now i can stop searching heehehheeh :)

Merry christmas

Quote · 24 Dec 2015

Hi Daeno,

 

I noticed you have a tool that moves blocks.  Can it be used to move the search module to various pages?

 

DivineArc

Quote · 13 Jan 2016

 

Hi Daeno,

 

I noticed you have a tool that moves blocks.  Can it be used to move the search module to various pages?

 

DivineArc

 
If your referring to the search bar at the top of the page, then no. That is not a page block.

If your referring to the blocks on the search page (search_home.php) then unfortunately those blocks are designed specifically for that page and cannot be copied to other pages and still function. Those are non-copyable blocks.

https://www.deanbassett.com
Quote · 13 Jan 2016

Do you happen to know which key it is?

Is it different for all templates or the same for all templates?

Thanks.

 

There isn't. It's no longer in the database. It's handled by a template key now. So it now requires code changes to get the desired results.

 

Quote · 13 Jan 2016

 

Do you happen to know which key it is?

Is it different for all templates or the same for all templates?

Thanks.

 

There isn't. It's no longer in the database. It's handled by a template key now. So it now requires code changes to get the desired results.

 

 
It's __main_search__ and is in _sub_header.html

It would be the same for any template designed for dolphin 7.2 that has it's own _sub_header.html

https://www.deanbassett.com
Quote · 13 Jan 2016

Hi all,

 

To hide the search field at the top of the page from non members edit /inc/classes/BxDolTemplate.php

 

Now find the following lines (around line 803):

 

            case 'main_search':
                $sRet = $GLOBALS['oFunctions']->genSiteSearch();
                break;

 

and change it to:

 

            case 'main_search':
            $iProfileId = getLoggedId();

               if ($iProfileId) {
                $sRet = $GLOBALS['oFunctions']->genSiteSearch();
                }
                break;

 

Now the search box is hidden to non members.

 

Hope this helps.

 

Gew

 

Quote · 13 Jan 2016

 

Hi all,

 

To hide the search field at the top of the page from non members edit /inc/classes/BxDolTemplate.php

 

Now find the following lines (around line 803):

 

            case 'main_search':
                $sRet = $GLOBALS['oFunctions']->genSiteSearch();
                break;

 

and change it to:

 

            case 'main_search':
            $iProfileId = getLoggedId();

               if ($iProfileId) {
                $sRet = $GLOBALS['oFunctions']->genSiteSearch();
                }
                break;

 

Now the search box is hidden to non members.

 

Hope this helps.

 

Gew

 

 AWESOME!!!

It works well

Thanks a lot

Quote · 13 Jan 2016

Hi The Music Vibe,

 

You're very welcome Smile

 

Good Luck

 

Gew

 

Hi all,

 

To hide the search field at the top of the page from non members edit /inc/classes/BxDolTemplate.php

 

Now find the following lines (around line 803):

 

            case 'main_search':
                $sRet = $GLOBALS['oFunctions']->genSiteSearch();
                break;

 

and change it to:

 

            case 'main_search':
            $iProfileId = getLoggedId();

               if ($iProfileId) {
                $sRet = $GLOBALS['oFunctions']->genSiteSearch();
                }
                break;

 

Now the search box is hidden to non members.

 

Hope this helps.

 

Gew

 

 AWESOME!!!

It works well

Thanks a lot

 

Quote · 13 Jan 2016

 Thank you Sir you too :)

 It's appreciate!

Quote · 13 Jan 2016

Thank you Gew 

 

http://certifiedhosting.com/
Quote · 13 Jan 2016

 

Thank you Gew 

 

 

You are very welcome.

 

Gew

Quote · 13 Jan 2016

Without it being a thread of just thank you's, I must also say thank you Gew. This is handy and works.

 

 

Thank you Gew 

 

 

You are very welcome.

 

Gew

 

Quote · 13 Jan 2016

Thanks for the info Deano

Quote · 14 Jan 2016

Hey Deano,

 

Just taking a shot in the open here because you build mods and I haven't found anything on this - but do you have a module that can modify the browse options?  Say you're looking at the All Members browse and you want to browse by something other than sex, age, or country?  It may be an option new to the database altogether (i.e. car manufacturer or miles per gallon).  Do you have anything that can do this? If not, how difficult would it be to create such a module?

 

Is it possible?

 

Quote · 25 Jan 2016

Deano,

 

No need to get back I think I've found a workaround - it's kind of a hack actually, but it works. 

 

Thanks anyway

Quote · 25 Jan 2016
 
 
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.