zpGallerific search behaviour

Hi, I think I am very close to having a great site running with this theme and Zenpage. I just have one thing that I want to fix if possible.
The search window on the 'search/archives' page acts in a rather odd way!!! If you type a search term and hit search...all ok and you see the results. But then if you go to search on something else, the new search term is appended to the previous. Obviously it is designed to do this, but it is far from obvious as to what is going on and after a few goes, you finally see a minute button to 'clear' the seach terms! I see lots of people failing to pick this up and unable to search. Indeed your own search window on this page acts in a far different and far better way! Can I do something about this for zpGal? Otherwise I will have to insert a set of instructions beside the search window to explain the very cryptic way in which the search function works. Many thanks.

Comments

  • acrylian Administrator, Developer
    The forum of course is an entire different software btw.

    As to the Zenphoto search there are buttons to click on where you can disable that. You can also modify your theme's search.php to disable this alltogether. Please see:
    http://www.zenphoto.org/support/topic.php?id=8809#post-51941
  • Excellent, thanks
  • Unfortunately, I don't understand code at all. I just went to your link and did as it said.... I "placed the following code in search.php somewhere before the call on printSearchForm()

    $_zp_current_search->processed_search = '';
    $_zp_current_search->words = '';

    But this doesn't work. The code simply prints on the page. Should it have < and > or what might be missing please?
  • Opps, I should have also said that I can see nowhere in zpGal where you can disable the behaviour. If it is there, you may have to give a clue as to where to look. Sorry about being a script illiterate!
  • acrylian Administrator, Developer
    Sorry, I am not familiar with this theme. As the topic linked says place it before the search form which should be found on the search.php theme page I assume this theme has, too.

    I just see that we of course have already the method to clear as mentioned in that topic. So place `$_zp_current_search->clearSearchWords()` before the search form.
  • Thanks Acrylian, but I am hopeless! I have just added it in to several places before the search form and I either hang the page up or it doesn't work. I think I need more specific directions as to where it should go. I presume it needs to be near here - but where? Sorry about that!

    <div class="wrapper">
    <div class="centered">
    <div id="archive-bar">
    <div id="search-top">
    <?php printSearchForm( '','searchform','',gettext('Search'),"$_zp_themeroot/images/drop.gif",null,null,"$_zp_themeroot/images/reset.gif" );?>
    </div>
  • acrylian Administrator, Developer
    Add the line before the printSearchForm() call on the search.php theme page (not on the others!). Of course we are assuming that you are running 1.4.2.4 and not an older Zenphoto release. As said I am not familiar with the theme but although it is a quite sophisticated one I doubt it does anything different in that regard.
  • Hi again, so you mean like this....

    <div id="archive-bar">
    <div id="search-top">
    $_zp_current_search->clearSearchWords()
    <?php printSearchForm( '','searchform','',gettext('Search'),"$_zp_th....

    This just prints the code on the webpage. Nothing else.
  • I really think you need to gain a little knowledge of how PHP works. What you have done is insert this code as HTML text. What you should have done is insert it as PHP code. See the line just below in your post as an example of this.
  • ah ok. I am only following what I have been told..... but that's all I needed. It's working now. I just didn't know what to look for! Many thanks!
Sign In or Register to comment.