-----Urspr�ngliche Nachricht-----
Von: Arthur van der Harg [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 4. September 2001 15:11
An: Resch Martin; '[EMAIL PROTECTED]'
Betreff: Re: [htdig-dev] [htdig] different colors in search results
Wichtigkeit: Hoch


At 14:49 +0200 04-09-2001, Resch Martin wrote:
>Hi everyone,
>
>I�d like HTDig to put the search results in different colors like this: the
>first one white, the second one blue, the third one white again and so on.
>How can I realize that?
>Would you help me please? Thank you!

Modify the template map to include a result format of your own. That 
format returns the found documents within a Javascript function call. 
Within that function you can do whatever formatting you like. Would 
work with PHP too, by the way.

So in lalala.conf you'll have

template_map:           my_long my_long ${common_dir}/Striped_results

and in ${common_dir}/Striped_results you'll have

<!-- START_ITEM -->
Score: <B><!-- START_RELEVANCE -->$PERCENT<!-- END_RELEVANCE --></B>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
var theTitle=unescape("$TITLE");
document.write(StripedLine('$URL',theTitle));
// -->
</SCRIPT>
<BR>
<!-- END_ITEM -->

You'll probably also need a wrapper page to define the function 
StripedLine(theURL,$theTitle). I used something similar to make a 
result template that gave the results in a form suitable for Apple's 
Sherlock.

HTH,

Arthur
-- 

Hi Arthur,

thanks for your answer, but now I�ve even more questions:

I tried already to put php-sources into these templates, but HTDig or my
Apache didn�t run it. But it�s in sourcecode, only not compiled. How did you
made php work?

And the second one is: what do you mean with START_RELEVANCE and
END_RELEVANCE?

Can you help me again?


Martin


_______________________________________________
htdig-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/htdig-dev

Reply via email to