Custom search result behavior

Post Reply
waynes
Posts: 21
Joined: Thu Nov 08, 2001 1:49 am

Custom search result behavior

Post by waynes »

I need to be able to change the Webinator search results to do the following.

1) replace all urls that contain 'modules/content.asp' with 'default.asp' and leave the rest of the URL intact. I found the sandr function in the manual - but are there any samples or hints for this ?

2) If the result is a binary file i need to open the result in a seperate window.

3) show a differnt icon in the search result according to MIME type.

Any samples and hints would be much appreciated !
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Custom search result behavior

Post by mark »

1) check out the texis tutorial
http://www.thunderstone.com/texis/site/ ... vxrex.html
<sandr "/modules/content.asp" "/default.asp" $Url><$Url=$ret>

2,3) The original mime type is not stored so you'll have to do it by extension. Maybe something like:
<rex "\.\P=[\alpha]{3,4}>>=" $Url><$Ext=$ret>
<switch $Ext>
<case doc> do something
<case pdf> do something
<default> do something
</switch>
Place a target tag in your href to open in a new window.
Post Reply