How to remove the Search Field from the Guest View ?!

randyh

Joined: 2010-04-09
Posts: 14
Posted: Tue, 2010-05-11 20:16

Hi

I searched a gallery script, and choosed gallery2 - a good choice ;)

I installed gallery 2 and made a few little changes in the *.tpl files.

All worked great...
But one Problem i could not resolve :(

How could i remove the Search from the Guest view ?!

Thx a lot !

kind reguards
randy

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2010-05-11 20:25

Check this out:
http://codex.gallery2.org/Gallery2:Themes:Reference:Variables

Edit /modules/search/templates/blocks/SearchBlock.tpl

Wrap all the code like so (new stuff in bold)

{if $user.isRegisteredUser}

 {if !isset($showAdvancedLink)} {assign var="showAdvancedLink" value="true"} {/if}

{g->addToTrailer}
<script type="text/javascript">

...

MORE CODE HERE

  </form>
</div>

{/if}

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
randyh

Joined: 2010-04-09
Posts: 14
Posted: Wed, 2010-05-12 07:47

It works great ! thx a lot and have a nice day :)

 
miki64

Joined: 2009-07-18
Posts: 38
Posted: Thu, 2010-05-13 07:19

it needs to add rhe new code in bold? nothing else?

visit my site
scattinviaggio.com

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2010-05-13 13:10

Yes, you might need to clear you cache after making the change:
FAQ: How can I clear cached data?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here