Page 1 of 1
Ajax Search Engine – Doesn't search news or faq module
Posted: Wed Sep 20, 2006 4:02 pm
by benn
The ajax search is perfect for my needs, except that it doesn't search within the news or faq modules.
I know the new search for cmsms version 1 searches within the news module but doesn't have the highlight function plugin 'function.content_highlight' that ajax has.
Can someone Help? Or improve the Excellent ajax search engine.
Re: Ajax Search Engine – Doesn't search news or faq module
Posted: Fri Oct 20, 2006 2:20 pm
by olaf_noehring
Hi
what did you do to get ajax search to work on your system?
At my system it always fails (cms 1.02)
Olaf
Re: Ajax Search Engine – Doesn't search news or faq module
Posted: Mon Oct 23, 2006 10:44 am
by benn
This problem took weeks to solve. In the end I used pisearch but added the Ajax highlight function to it.
Here's what to do:
Install
pisearch 1.71
ajax plugin: function.content_highlight.php (into plugins folder)
Then edit pisearch in the content menu
Form:
Code: Select all
<!-- Start PisearchForm -->
<form action="http://www.webber-design.com/RCPCH/index.php?page=Pisearch" method="post">
<table summary="Pisearchtable">
<tr>
<td>
<label for="Inputfeld for words to search"><h4>Search</h4></label>
</td>
</tr>
<tr>
<td><input type="text" value="Words to search ..." maxlength="255" size="25" name="pisearch" id="searching" /></td>
</tr>
<tr>
<td><select name="special" size="1">
<option value="0">Standard</option>
<option value="1">Soundex</option>
<option value="2">Levenshtein</option>
<option value="3">Similar Text</option>
</select>
</td>
</tr>
<tr>
<td>
<select name="textlength" size="1">
<option value="100">100 Length of text </option>
<option value="200">200 Length of text </option>
<option value="300">300 Length of text </option>
<option value="400">400 Length of text </option>
</select>
</td>
</tr>
<tr>
<td>
<input type="submit" value="{$searchbutton}" id="buttonSearch" />
<input type="hidden" name="action" value="showresults" />
</td>
</tr>
</table>
</form>
<!-- End ModPisearchForm -->
Results
Code: Select all
{if $pisearchtotal eq 0}
{if $pisearchwordcount >1}
<div class="pisearchresultheader">{$noresult_many_a} ->{$pisearchwords}<- {$noresults_many_b}.</div>
{else}
<div class="pisearchresultheader">{$noresult_one_a} ->{$pisearchwords}<- {$noresult_one_b}.</div>
{/if}
{else}
{if $pisearchtotal > 1}
<div class="pisearchresultheader">{$results_many_a}{$pisearchtotal} {$results_many_b} ->{$pisearchwords}<-.</div><br />
{else}
<div class="pisearchresultheader">{$results_one_a}{$pisearchtotal} {$results_one_b} ->{$pisearchwords}<-.</div><br />
{/if}
{/if}
{$searchmode}:
{if $pispecial eq 0}
{$standard}
{elseif $pispecial eq 1 }
{$soundex}
{elseif $pispecial eq 2 }
{$levenshtein}
{elseif $pispecial eq 3 }
{$similartext}
{/if}<br /> <br />
{foreach from=$pisearchresults item=entry}
<a class="pisearchlink" href="{$entry->url}&mots={$pisearchwords}">{$entry->menutext}</a> <br /><br />
<div class="pisearchdetails">{$entry->details}</div><br />
{/foreach}
Hope this helps