Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD: SuperSearch : Super Enhanced Snitz Search
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 6

mvaughn
Starting Member

30 Posts

Posted - 11 June 2001 :  17:36:17  Show Profile  Visit mvaughn's Homepage  Send mvaughn an ICQ Message
How about, eventually, having it highlight the searched out words.

-Mark-
__________________
That which fascinates us, is in fact true.
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 11 June 2001 :  19:32:08  Show Profile
Something like this: http://www.codeproject.com/asp/highlight.asp

you could use the function mentioned in that article to process the Topic subject and the Topic and reply messages.
Go to Top of Page

mfindlay
Junior Member

USA
144 Posts

Posted - 11 June 2001 :  19:39:41  Show Profile  Visit mfindlay's Homepage
quote:

Something like this: http://www.codeproject.com/asp/highlight.asp

you could use the function mentioned in that article to process the Topic subject and the Topic and reply messages.



I knew I saw that article somewhere. Thanks.

Go to Top of Page

mfindlay
Junior Member

USA
144 Posts

Posted - 12 June 2001 :  12:11:48  Show Profile  Visit mfindlay's Homepage
quote:

How about, eventually, having it highlight the searched out words.

-Mark-
__________________
That which fascinates us, is in fact true.



Working on it now. I am going to release SuperSearch 2.0 first. It has a complete reworking of the query and adds a 'max recs to display' option and some other items. I've been playing around with the highlighting code and it looks like a go so will add that after 2.0

Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 12 June 2001 :  16:49:37  Show Profile
mfindlay,

I have put the beta version 2 in, but thought that I would let you know that you for got to change the 'form action' tag to search.asp. It was looking for test_search.asp.

Apart from that no issues with putting it in.

quote:

Working on it now. I am going to release SuperSearch 2.0 first. It has a complete reworking of the query and adds a 'max recs to display' option and some other items. I've been playing around with the highlighting code and it looks like a go so will add that after 2.0





Regards,

Webmaster @ Classic Motor Cycling
Classic Motor Cycling
Go to Top of Page

mfindlay
Junior Member

USA
144 Posts

Posted - 12 June 2001 :  16:58:08  Show Profile  Visit mfindlay's Homepage
quote:

mfindlay,

I have put the beta version 2 in, but thought that I would let you know that you for got to change the 'form action' tag to search.asp. It was looking for test_search.asp.

Apart from that no issues with putting it in.

quote:

Working on it now. I am going to release SuperSearch 2.0 first. It has a complete reworking of the query and adds a 'max recs to display' option and some other items. I've been playing around with the highlighting code and it looks like a go so will add that after 2.0





Regards,

Webmaster @ Classic Motor Cycling
Classic Motor Cycling



I just caught that myself (there is no smilie for "Doh!"...) I have updated the zipfile. Hope it didn't cause too much confusion. Thanks for the note!



Edited by - mfindlay on 13 June 2001 00:02:31
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 12 June 2001 :  17:40:29  Show Profile
Mark,

I got the highlighting to work, but I used inline styles to have a different color background. Basically the colors are just reversed for the highlighted words. I've got it working in the topic message and reply message, but just for the individual words right now. I've still got to add in an if/then for if the user is searching for a phrase and pass that variable on to topic.asp. Also need to add the highlighting code to the Topic subject as well.
Go to Top of Page

mfindlay
Junior Member

USA
144 Posts

Posted - 12 June 2001 :  18:46:37  Show Profile  Visit mfindlay's Homepage
quote:

Mark,

I got the highlighting to work, but I used inline styles to have a different color background. Basically the colors are just reversed for the highlighted words. I've got it working in the topic message and reply message, but just for the individual words right now. I've still got to add in an if/then for if the user is searching for a phrase and pass that variable on to topic.asp. Also need to add the highlighting code to the Topic subject as well.



Great, you might want to hold off on any search.asp changes until I post the 2.0 release later this evening since it is a major rewrite from the 1.x versions.

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 12 June 2001 :  20:19:49  Show Profile
I've been working with just the standard Snitz search.asp page.
Go to Top of Page

Freeman II
Junior Member

232 Posts

Posted - 13 June 2001 :  01:24:13  Show Profile
good job awesome mod!

when are you going to release the next version? with word highlights

Go to Top of Page

mfindlay
Junior Member

USA
144 Posts

Posted - 13 June 2001 :  02:02:29  Show Profile  Visit mfindlay's Homepage
quote:

good job awesome mod!

when are you going to release the next version? with word highlights





2.2 has now been released. You can download it at http://www.sagecomputerservices.com/downloads/supersearch.asp

Contains:
*Color coding of keywords
*Admin configurable color coding settings
*Admin configurable max number of keywords to allow any single search on
*Admin configurable max input length of search edit box for any single query


Edited by - mfindlay on 14 June 2001 21:42:37
Go to Top of Page

bjlt
Senior Member

1144 Posts

Posted - 13 June 2001 :  02:09:28  Show Profile
question:

will the highlight work on asian languages? e.g. no space between words/centence, diff comma, period etc.

this is in a low priority.

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 13 June 2001 :  02:24:30  Show Profile
Problems with the highlighting that I have come across with testing it myself is with single letters. Try doing a search for: h for example. Then view the posts. It messes up the HTML tags in the messages. Maybe just check for the length of the searchword, if it's 1 character, then don't process the highlight code?

Here is what I use in the topics:
keywords = split(Request.QueryString("searchwords"), " ")
myText = formatStr(rs("T_MESSAGE"))
strStart = "<font style=""background-color:" & strForumFontColor & "; color:" & strForumFirstCellColor & ";"">"
For Each word in keywords
myText = Highlight(myText, word, strStart, "</font>")
Next %>


Here is what I use in the replies:

keywords = split(Request.QueryString("searchwords"), " ")
myText = formatStr(rs("R_MESSAGE"))
strStart = "<font style=""background-color:" & strForumFontColor & "; color:" & CColor & ";"">"
For Each word in keywords
myText = Highlight(myText, word, strStart, "</font>")
Next %>


That way with both the Topic and the Replies the highlight font is the same color as the cell background color and the background highlight is the same color as the message font. Of course there are probably browsers that don't like inline styles. You could also define .highlight1 & .highlight2 in the CSS portion of inc_top.asp and then just use class=highlight1 or class=highlight2.
Go to Top of Page

mfindlay
Junior Member

USA
144 Posts

Posted - 13 June 2001 :  13:38:28  Show Profile  Visit mfindlay's Homepage
quote:

question:

will the highlight work on asian languages? e.g. no space between words/centence, diff comma, period etc.

this is in a low priority.





I believe it should since the query uses the LIKE %word% clause, but of course the best way to find out is to run it. Let me know if you would like an advance BETA copy.

Go to Top of Page

mfindlay
Junior Member

USA
144 Posts

Posted - 13 June 2001 :  14:00:48  Show Profile  Visit mfindlay's Homepage
quote:

Problems with the highlighting that I have come across with testing it myself is with single letters. Try doing a search for: h for example. Then view the posts. It messes up the HTML tags in the messages. Maybe just check for the length of the searchword, if it's 1 character, then don't process the highlight code?

Here is what I use in the topics:
keywords = split(Request.QueryString("searchwords"), " ")
myText = formatStr(rs("T_MESSAGE"))
strStart = "<font style=""background-color:" & strForumFontColor & "; color:" & strForumFirstCellColor & ";"">"
For Each word in keywords
myText = Highlight(myText, word, strStart, "</font>")
Next %>


Here is what I use in the replies:

keywords = split(Request.QueryString("searchwords"), " ")
myText = formatStr(rs("R_MESSAGE"))
strStart = "<font style=""background-color:" & strForumFontColor & "; color:" & CColor & ";"">"
For Each word in keywords
myText = Highlight(myText, word, strStart, "</font>")
Next %>


That way with both the Topic and the Replies the highlight font is the same color as the cell background color and the background highlight is the same color as the message font. Of course there are probably browsers that don't like inline styles. You could also define .highlight1 & .highlight2 in the CSS portion of inc_top.asp and then just use class=highlight1 or class=highlight2.



IMHO I think it's more appropriate not to process the keyword at all right from the start if it's a single letter. I am editing out single entries at the point of building the querystring. Just a couple other non-color-coding considerations, I am allowing the admin to set the max input length of the entire keyword field and the max number of keywords allowed to be searched for, to prevent malicious or at least unintentional overloading of the system/query.

Go to Top of Page
Page: of 6 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07