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
--

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

Reply via email to