Pisearch - exclude unneccesary parameters?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Traill
Forum Members
Forum Members
Posts: 25
Joined: Sat Jul 07, 2007 2:22 pm

Pisearch - exclude unneccesary parameters?

Post 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.
cyberman

Re: Pisearch - exclude unneccesary parameters?

Post 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?
Traill
Forum Members
Forum Members
Posts: 25
Joined: Sat Jul 07, 2007 2:22 pm

Re: Pisearch - exclude unneccesary parameters?

Post 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! :)
Traill
Forum Members
Forum Members
Posts: 25
Joined: Sat Jul 07, 2007 2:22 pm

Re: Pisearch - exclude unneccesary parameters?

Post 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...
cyberman

Re: Pisearch - exclude unneccesary parameters?

Post 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;
Traill
Forum Members
Forum Members
Posts: 25
Joined: Sat Jul 07, 2007 2:22 pm

Re: Pisearch - exclude unneccesary parameters?

Post by Traill »

Thank you so much Cyberman! I am very grateful for all your help  :)
Post Reply

Return to “CMSMS Core”