|
SeeSearchWords search engine word highlighter |
|
Buy at phdcc store Buy at the DotNetNuke Store ![]() |
||
| Reviews | "SeeSearchWords has rapidly become indispensable for our intranet portal" |
Copyright © 2005-2010 PHD Computer
Consultants Ltd sales@phdcc.com |
|||
|
SeeSearchWords highlights search words that were used at a major search engine in your own web pages - or a DotNetNuke search:
|
|
For a DotNetNuke (DNN) search (example):
The highlighting examples in this documentation are like this, ie the text is bold and dark blue with a light green background. However the real highlighter uses a different format: bold and red with a yellow background. The real highlighter also adds a message at the top of the page like this (except that it will have a yellow background):
| SeeSearchWords has highlighted your Bing search |
The highlighting occurs whenever a user navigates to your site from one of the supported
search engines - see below for details of the page types supported. You do not need
to alter your pages at all. The highlighting is similar to the "Cached" option provided
by some search engines, except that it works on the current live version of your
page. And SeeSearchWords also highlights similar words, so if you searched for
learn then SeeSearchWords would highlight learn, learns and
learning - if these words are on your page.
A free version is available for download at the phdcc DNN site.
A retail version is available - full details below - this lets you:
SeeSearchWords has been designed to add to an existing ASP.NET application (ie it is not normally installed as a stand-alone web application). SeeSearchWords will work with any web application that returns HTML as .aspx pages, including the DotNetNuke (DNN) version 3, 4 and 5 framework.
ssw_free.zip.phdcc.fis.Find.dll and phdcc.SeeSearchWords.dll
into the application bin directory.
Save a copy of the application root Web.Config file, in case of any
problems.
Web.Config file, add an entry
to the <httpModules> section
<httpModules>
<add name="SeeSearchWords" type="com.phdcc.SeeSearchWords.SeeSearchWordsModule,
phdcc.SeeSearchWords"/>
</httpModules>
|
If <httpModules> does not already exist, create it (within the
<system.web> section).
Web.Config file, add an entry
to the <system.webServer><modules> section
<system.webServer>
<modules>
<add name="SeeSearchWords" type="com.phdcc.SeeSearchWords.SeeSearchWordsModule,
phdcc.SeeSearchWords" preCondition="managedHandler"/>
</modules>
</system.webServer>
|
If <system.webServer><modules> does not already exist, create it (within the
<configuration> section).
Web.Config file has changed). SeeSearchWords is an ASP.NET application, for MS-servers, eg IIS 5, IIS 6 and IIS 7, including shared hosts.
SeeSearchWords only highlights search words in web pages that are processed by ASP.NET. In most cases, this means that it only highlights search words in pages that have the
.aspxfile extension. However, IIS can be set up so that other file types such as.htmcan be processed by ASP.NET.SeeSearchWords currently supports Bing, Yahoo, Ask and AOL, including their Advanced Search options.
Tested in DotNetNuke (DNN) 3.0.13 and 3.1.0 with Friendly URLs on and off. Also runs OK in DNN 3.2.2, DNN 4.0.2 and DNN 04.08.00, and DNN 5.2.1 and DNN 5.2.3.SeeSearchWords will not work with compressed streams, eg in conjunction with filters that apply a gzip or deflate
Content-Encodingsuch as the DNN [Host][Host Settings][Advanced Settings][Performance Settings][Compression Setting] and blowery.org's HttpCompressionModule.
If you use Spohn Software's SlipStream Camouflage module, please update it to version 1.5.2 or later so that it works with SeeSearchWords.Let us know if you want us to write a version of this software that will intercept all requests, eg an ISAPI filter. An ISAPI filter may be harder to install on a shared server.
The retail version of SeeSearchWords lets you customise the features provided in the free version, and adds some new options:
- Change the highlighting
- Add navigation arrows to move between search words
- Change or remove the header message
- Use alternative word stemming rules (inc German and French)
- Only highlight in specified section of each page
- Support further search engines
- Restrict the sites where highlighting works
SeeSearchWords has been designed to add to an existing ASP.NET application (ie it is not normally installed as a stand-alone web application). SeeSearchWords will work with any web application that returns HTML as .aspx pages, including the DotNetNuke (DNN) version 3, 4 and 5 framework.
To install the retail version of SeeSearchWords, you need to add the runtime DLLs to the web application
bindirectory and amend the applicationWeb.Configfile in three places - carefully. Additional configuration information can be put in further files anywhere in the application directory structure.The retail version of SeeSearchWords is compatible with DotNetNuke (DNN) 3, 4 and 5. However, there is no facility to configure SeeSearchWords from within the DNN online configuration screens, ie there is no DNN admin module.
The retail version is supplied as a ZIP file, named
ssw_retail.zipor similar.
- Unzip the download into a clean directory.
- Upload
phdcc.fis.Find.dllandphdcc.SeeSearchWords.dllinto the web applicationbindirectory.- Save a copy of your web application root
Web.Configfile, in case of any problems.- For IIS 6: In the
Web.Configfile, add an entry to the<httpModules>section:
If
<httpModules> <add name="SeeSearchWords" type="com.phdcc.SeeSearchWords.SeeSearchWordsModule, phdcc.SeeSearchWords"/> </httpModules><httpModules>does not already exist, create it (within the<system.web>section), ie add all the above text.- For IIS 7: In the
Web.Configfile, add an entry to the<system.webServer><modules>section
<system.webServer> <modules> <add name="SeeSearchWords" type="com.phdcc.SeeSearchWords.SeeSearchWordsModule, phdcc.SeeSearchWords" preCondition="managedHandler"/> </modules> </system.webServer>If
<system.webServer><modules>does not already exist, create it (within the<configuration>section).- Add these lines in the
<configSections>section:
<configSections> <sectionGroup name="phdcc"> <section name="SeeSearchWords" type="com.phdcc.SeeSearchWords.ConfigSectionHandler,phdcc.SeeSearchWords" /> </sectionGroup> </configSections>If
<configSections>does not already exist, create it (within the<configuration>section), ie add all the above text just after<configuration>.- Add all these lines in the
<configuration>section, typically just after</configSections>:
<phdcc> <SeeSearchWords> <add key="options" value="debuginfo,arrows"/> </SeeSearchWords> </phdcc>
Each instance of <add .. /> specifies an parameter. In this case, the "options" parameter has been set to "debuginfo,arrows" to tell SeeSearchWords that you want to see debug output and that you want navigation arrows to be shown. A full list of available parameters is listed below.As well as <add .. />, you can use <clear/> to clear all previously added parameters, and <remove key="param" /> to remove the specified parameter.
- Your application should automatically restart and use SeeSearchWords when you next access it (because the
Web.Configfile has changed).- SeeSearchWords only reads its options when the web application starts. Any update to
Web.Configwill restart the application, so SeeSearchWords will immediately see any changes that you make inWeb.Config. However if you make changes to other SeeSearchWords configuration files, then you will need to restart the application using Host>Site Settings>Restart Application. (Alternatively you can re-saveWeb.Configto restart the application.) You may also need to clear your Temporary Internet Files.
The following parameters can be specified in the
phdcc/SeeSearchWordssection using <add key="parameter" value="value" />.Parameter values that include angle-brackets must have these characters 'escaped', eg < must be written as
<etc. Because this is confusing, for most parameters there is an option to read the real value from a file instead, as indicated by the From File column - see below for details of how to do this.
Parameter From File Description Default options Comma-separated list of options:
debuginfo Display SeeSearchWords debug info at the bottom of each page arrows Display arrows to navigate between search words headertop Insert the Header at the very start of the page output headerafterbody Insert the Header just after the page <BODY> tag headerafterbodyform Insert the Header just after the first <FORM> tag after the page <BODY> tag HighlightPartialWords Highlights words that start with the search word (as well as those matched by the rules) HighlightPartialWordsAnywhere Highlights words that contain the search word anywhere (as well as those matched by the rules) JumpToFirstUse Outputs JavaScript that jumps to the first highlighted instance of a search word on the page headerafterbodyform HilitePre @ The HTML used to start highlighting <span style='background:yellow; color:red; font-weight:bold;'> HilitePost @ The HTML used to end highlighting </span> HiliteStart @ The HTML comment used to indicate when highlighting should start - see below not set HiliteEnd @ The HTML comment used to indicate when highlighting should end not set HiliteArrowBack @ The HTML used as the back navigation arrow <B><</B> HiliteArrowNext @ The HTML used as the next navigation arrow <B>></B> HiliteAnchorName @ The A tag base anchor name used for navigation arrows sswanchor Header @ The HTML used in the header, including template variables - see below see below rules @ The word matching ruleset, starting with res:or@- see belowres:SeeSearchWords.rulesen.txt Patterns @ The list of patterns used to detect URLs that contain search words - see below see below Sites @ The list of sites where highlighting enabled - see below All sites
As stated above, parameter values must have angle-bracket characters 'escaped' when they are used in the
Web.Configfile. The neater alternative is to store the information in a plain text file, one for each parameter. The parameter value must then contain@followed by the file path. The path is relative to the web application directory, so a parameter value of@DesktopModules/SSWhipre.Configwould obtain the parameter by reading the fileSSWhipre.Configin the sub-directoryDesktopModules.It is recommended that you use a filename extension of
.Configso as to make the file unreadable by a browser (because IIS bars direct access to such files). The file should be in UTF-8 format.Here is an example
phdcc/SeeSearchWordssection inWeb.Config:
<phdcc> <SeeSearchWords> <add key="options" value="arrows" /> <add key="HilitePre" value="@DesktopModules/SSWhipre.Config" /> <add key="HilitePost" value="@DesktopModules/SSWhipost.Config" /> <add key="HiliteArrowBack" value="<i>&lt;</i>" /> <add key="HiliteArrowNext" value="<i>&gt;</i>" /> </SeeSearchWords> </phdcc>As you can see, specifying the HiliteArrowBack and HiliteArrowNext parameters is a bit awkward.
The HilitePre parameter value is obtained from fileDesktopModules/SSWhipre.Config, which might contain this:The HilitePost parameter value is obtained from file
<SPAN STYLE='background: #ffff99;'><FONT COLOR=blue>DesktopModules/SSWhipost.Config, which might contain this:
</FONT></SPAN>Remember that changes to parameter files will not be read until SeeSearchWords re-starts, eg when the web application
Web.Configfile is re-saved.
You may want SeeSearchWords to highlight only certain sections of your web pages, eg to highlight only in the main content pane. SeeSearchWords achieves this using the HiliteStart and HiliteEnd parameters, specifying text to look for in HTML comments. For example, if HiliteStart is set to
SSW_STARTand HiliteEnd is set toSSW_END, then the following skin template HTML shows how to only highlight the "ContentPane" portion of the page:
<TR valign="top"> <TD class="leftpane" id="LeftPane" runat="server" valign="top" align="center"></TD> <!-- SSW_START --> <TD class="contentpane" id="ContentPane" runat="server" valign="top" align="center"></TD> <!-- SSW_END --> <TD class="rightpane" id="RightPane" runat="server" valign="top" align="center"></TD> </TR>If these parameters are not set then SeeSearchWords highlights the entire page.
Conversely, if the parameters are set but not found, then SeeSearchWords never highlights.
The actual comment text must start with<!--, must match the letter case of the parameters exactly, and the parameter value must be surrounded by spaces.
More than one highlighting section may be specified - by repeating the start and end comments.SeeSearchWords also does not highlight text as follows: from
<div class="nossw">until the next following </div>, eg:
This text is highlighted <div class="nossw">This text is not highlighted</div>
This is the default HTML used as the Header parameter:
<div style='background-color:yellow; font-size:x-small;'> <a href='http://www.phdcc.com/seesearchwords/' target='_blank' title='SeeSearchWords %SSW_VERSION%'>SeeSearchWords</a> has highlighted your %SEARCH_ENGINE% search: <b>%SEARCH%</b> <a href='%PLAIN_URL%'>Show page without highlighting</a> </div>The Header HTML can (optionally) contain variables that will be replaced at runtime by SeeSearchWords:
%PLAIN_URL% A URL to show the page without highlighting %SEARCH% The user's search words %SEARCH_ENGINE% The search engine used %SSW_VERSION% The SeeSearchWords version Because the header will usually contain a lot of HTML, it is usual to specify the header in a file (using
@pathas the Header parameter). To remove the header specify a blank Header:
<add key="Header" value="" />SeeSearchWords can insert the header HTML at different points in the generated output, depending on which value is set in the options parameter.:
The first two options often result in an extra blank line after the header, so headerafterbodyform is the default.
- headertop: At the very start of the page
- headerafterbody: After the page <BODY>
- headerafterbodyform: After the first <FORM> tag after the page <BODY> tag
SeeSearchWords uses 'rules' to generate variant words - so that if the user searched for
learnthen SeeSearchWords would highlightlearn, learnsandlearning- if these words are on your page.By default, SeeSearchWords uses an English set of rules. The following rule sets are available (
res:indicates that the file is stored in the SeeSearchWords DLL):
Language Header parameter File English res:SeeSearchWords.rulesen.txtrulesen.txt French res:SeeSearchWords.rulesfr.txtrulesfr.txt German res:SeeSearchWords.rulesde.txtrulesde.txt To specify an alternate rules file, use
@pathas the rules parameter. The format of a rules file is specified here.Note that the options parameter has HighlightPartialWords and HighlightPartialWordsAnywhere options which also act as highlighting rules. For example, with HighlightPartialWordsAnywhere set, a search for
plawould highlight "plain" and "replant".
At the start of every request to the application, SeeSearchWords looks to see if the request has search words that need to be highlighted. If highlighting is not needed, SeeSearchWords plays no further part in the request processing (unless the options parameter contains debuginfo).
SeeSearchWords determines if a request needs highlighting by looking for patterns, either in the request URL or the referrer URL. In most cases, SeeSearchWords will be looking for a pattern in the referrer URL. For example, if the user has just clicked to navigate from the Bing search results into your application, then the request URL will be on your site but the referrer URL will start with
http://www.bing.comand will usually contain the user's search words in theqquerystring parameter in the referrer URL. For example, a Bing search for SeeSearchWords highlights words will supply SeeSearchWords with a referrer URL ofhttp://www.bing.com/search?q=SeeSearchWords+highlights+words. (SeeSearchWords is able to decode this correctly to convert the + characters to spaces, etc.)This is the default text for the patterns parameter, finding search words to highlight for DNN, Bing, Yahoo, Ask and AOL. (Google is no longer supported.)
url,,Search,_nossw,DotNetNuke ref,http://www.google.co,q,,Google ref,http://www.google.co,as_epq,,Google ref,http://www.google.co,as_q,,Google ref,http://www.bing.com,q,,Bing ref,http://search.msn.co,q,,MSN ref,http://search.yahoo.com/search,p,,Yahoo ref,http://search.yahoo.com/search,vp,,Yahoo ref,*.ask.com/,q,,Ask ref,*.aol.com/,q,,AOL ref,,Search,,DotNetNuke ref,^.*/SearchResults/.*/Search/(?<searchd>\S*)/,,,DotNetNukeEach line is a pattern containing these comma-separated fields:
Type Which URL to match, either urlfor the the request URL orreffor the the referrer URLmatch If query specified then
- a string that starts the URL, or
- if the string starts with * then the string must be anywhere in the URL;
otherwise a regular expression - see below.query The QueryString parameter name that contains the search words notquery If this QueryString parameter is present, then the words are not highlighted engine The search engine name For example, for this pattern:
ref,http://www.google.co,q,,Googleif the referrer URL starts with
http://www.google.coand containsqQueryString parameter, then SeeSearchWords highlights the found words (from Google).Regular expression matches
If the query pattern field is empty, then the match field specifies a regular expression. If the relevant URL matches the regular expression, then a match is found. The regular expression must set either a
searchorsearchdgroup. If the found search words need to be UrlDecode-d, then setsearchd; otherwise setsearch.For example, an example DNN 3.0.13 Friendly URL search for look for might result in this as the referrer URL:
In plain English, SeeSearchWords needs to look for
http://localhost/DNN3013/SearchResults/tabid/37/Search/look+for/Default.aspx/SearchResults/in the URL, with the search words after/Search/up until the next/character. The following regular expression finds this (and reports the search words in thesearchdgroup):This is built up as follows:
^.*/SearchResults/.*/Search/(?<searchd>\S*)/
^ Match the start of the string .* Match any character, repeated 0 or more times /SearchResults/ Match literal /SearchResults/.* Match any character, repeated 0 or more times /Search/ Match literal /Search/(?<searchd> Start capture group named searchd\S* Match any non-space character, repeated 0 or more times ) End capture group / Match literal /Open-SearchEngine
SeeSearchWords can be used in conjunction with the Open-SearchEngine from www.opendnn.com. You need to add two new patterns.
First, specify a Patterns parameter to refer to a file, eg:
<add key="Patterns" value="@DesktopModules/SSWpattern.Config" />Create UTF-8 text file
SSWpattern.Config, copying the default patterns above if you wish. Add in the following patterns:Replace SiteURL with your site's base URL, eg
url,SiteURL,xsq,_nossw,Open-SearchEngine
ref,SiteURL,xsq,,Open-SearchEnginehttp://www.example.org/.
Check that highlighting works as expected on all pages.
In some situations, SeeSearchWords may be used on a server that hosts more than one web site, eg DNN with more than one portal.
The sites parameter specifies the site(s) that SeeSearchWords should respond at. If this parameter is missing then SeeSearchWords responds on all sites.
The sites parameter should either contain a single URL or an @FromFile URL text file that contains URLs one per line.
If a request URL starts with any one of the given sites URLs then highlighting is performed (assuming that a pattern matches). The match is done case insensitively.
- Sat, 5 Jan 2008 14:15:44 -0800
Mark L- Rating: 4 stars
Although this module does not install the same way as other modules, it gets the job done. The instructions could provide more examples of the different elements of the module, and be a little less vague. The instructions were not clear that there needs to be a separate config file for every parameter element. Also, you will need to clear your temporary internet files before going to Host>Site Settings>Restart Application. Support response time was prompt.
- Fri, 27 Jan 2006 08:54:40 -0500
Nazer Aboobaker, Sudbury Regional Hospital, Canada- Thanks Chris for your quick response.
I would like to state which many others have stated many times. You have an excellent product and today I have experienced that support for the product is even outstanding.
- Wed, 31 Aug 2005 10:05:36 -0400
William Winans, Rainbow Babies & Children's Hospital, Cleveland, USA- The module is fantastic, it makes the difference between an average and professional website. Our credibility to the web users grows by leaps and bounds when they see this type of functionality. I'll be launching our redesign in November, please feel free to use us as a satisfied customer.
- Tue, 12 Jul 2005 09:20:00 +0200
Marc Poljak, Central Archive for Empirical Social Research, University Cologne, Germany- I cannot praise this little piece of software and his author enough. The ability to highlight hits and to navigate between the search words really refines your DNN search. SeeSearchWords has rapidly become indispensable for our intranet portal. And have I already mentioned the excellent support?