Page 1 of 1

Pisearch - exclude unneccesary parameters?

Posted: Wed Jan 23, 2008 9:24 pm
by Traill
I have spent the last hour searching these forums for an answer to this but I have found nothing, so here is my question!

Pisearch currently has 2 extra dropdowns for 4 different types of search and 4 different types of text length for the results to be displayed in... However, I'll always want to use "Standard" search and "400" characters for each result that is displayed. So, is it possible to default the values to those above (Standard and 400), and then remove those 2 dropdowns from the front-end user, so they are invisible?

I love the customizable attributes to Pisearch but it just clutters up the space for me because I am having a quick-search box on every page of my site...

Hope that's clear, thank you for reading and hope someone can help!  :)
T.

Re: Pisearch - exclude unneccesary parameters?

Posted: Wed Jan 23, 2008 10:05 pm
by cyberman
Traill wrote: remove those 2 dropdowns from the front-end user, so they are invisible?
Have you tried to remove this fields in search template?

Re: Pisearch - exclude unneccesary parameters?

Posted: Thu Jan 24, 2008 10:02 am
by Traill
Thanks Cyberman

Yes, I can make the buttons disappear by removing them from the form template, but the results always just show 100 characters, and I would ideally like 400... I guess that's all I'm looking to do now, hope you can help! :)

Re: Pisearch - exclude unneccesary parameters?

Posted: Sat Jan 26, 2008 1:05 pm
by Traill
So is there any way to default the search to 400 characters?

Also, on the results screen, at the moment each result only displays 10 characters or so before the highlighted search word, and then loads of characters after. Is there any way to produce results where there are an even number of characters surrounding the searched word?

Thanks in advance, really appreciate it...

Re: Pisearch - exclude unneccesary parameters?

Posted: Sun Jan 27, 2008 10:10 pm
by cyberman
You have to modify pisearch.module.php, line 256-260 from

Code: Select all

  if ($ende ==0 or $ende <0) $ende=100;
 }
 else
 {
   $ende= isset($params['textlength']) ? $params['textlength']:100;
to

Code: Select all

  if ($ende ==0 or $ende <0) $ende=400;
 }
 else
 {
   $ende= isset($params['textlength']) ? $params['textlength']:400;

Re: Pisearch - exclude unneccesary parameters?

Posted: Mon Jan 28, 2008 2:23 pm
by Traill
Thank you so much Cyberman! I am very grateful for all your help  :)