Page 1 of 1

color for highlighting

Posted: Wed Apr 03, 2002 4:46 am
by astrid.grossboetzl
hi,
is it possible to give the highlighted query a color like red? i only found the m-flag in the fmt-function and there is no possibility.
best regards
Astrid

color for highlighting

Posted: Wed Apr 03, 2002 10:06 am
by Kai
There's no option to do this directly, but if there are no tags you wish preserved already in your text, you can use "%mbH" and <sandr> the resulting <B> and </B> tags into red:

<strfmt "%mbH" $query $txt>
<$s = "<B>" "</B>">
<$r = "<FONT COLOR=red>" "</FONT>">
<sandr $s $r $ret>
<send $ret>

color for highlighting

Posted: Mon Apr 08, 2002 8:38 am
by astrid.grossboetzl
I write the following into the script:
<fmtcp query "%mbH" $mmfmt><!-- setup hit markup -->
<$s = "<B>" "</B>">
<$r = "<FONT COLOR=red>" "</FONT>">
<sandr $s $r $ret>
<send $ret>

But it doesn´t work. Maybe I wrote this into the wrong section. Can yout tell me the section?
thanks

color for highlighting

Posted: Mon Apr 08, 2002 10:07 am
by mark
Put it where the data you want hilighted is output. But you've replaced <strfmt> with <fmtcp>. That is incorrect. Follow the example kai gave.

color for highlighting

Posted: Mon Apr 08, 2002 11:57 am
by astrid.grossboetzl
Can you tell me what the argument $txt means?
I can´t find it in my documentation.
<strfmt "%mbH" $query $txt>
<$exp = "<B>" "</B>">
<$replace = "<i>" "</i>">
<sandr $exp $replace $ret>
<send $ret>
Thanks

color for highlighting

Posted: Mon Apr 08, 2002 12:33 pm
by Kai
$txt is the variable that contains the text to be marked up. It could be any variable, depends on the script context.

color for highlighting

Posted: Thu Apr 11, 2002 3:10 am
by astrid.grossboetzl
hi,
when i take your code it doesn´t work. In the source code of the webpage i get the error:
<!-- 015 /webinator/search-cms:530: Can't turn on markup: No query set with <fmtcp> -->
can you tell me whats wrong in my code?
thanks

color for highlighting

Posted: Thu Apr 11, 2002 10:01 am
by mark
Sounds like you're using <mm> somewhere but haven't called <fmtcp> to setup a query. If you're using the <strfmt> method you probably shouldn't be using <mm>.