PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Is it possible to add dynamic content to search results

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is it possible to add dynamic content to search results

    This might be a bit difficult to explain but I'll give it a good go.

    I have an Intranet type site that I index in offline ASP mode. The purpose of using Zoom search is to provide the users with an easy way of searching for a specific document (pdf or doc), rather than the actual pages of the site. Users are able to navigate to the documents that they want using menus etc. I use the metadata and .desc files to categorise the documents and that works very well and I am happy with it.

    If a user navigates through the site they are able to hover their mouse over an icon to have a tool tip pop up to show a snapshot of the document. These jquery tooltips (jquery Cluetip by Karl Swedberg) are pulled through via Ajax from individual html files. Below is an example of the html

    HTML Code:
    <a href="link to doc.pdf" target="_blank" class="tips" rel="link to tooltip.html" >
    The tip class on the link displays the html as designated by the rel...clear as mud??

    What I want to do is be able to show the same tool tip in the SEARCH RESULTS. For example if the search returns a result for "actual.pdf" I want the user to be able to hover over the link (or search image) and have a tooltip display

    Any thoughts would be greatly appreciated

  • #2
    You might need to modify the search.asp script code. But note that we can't provide support afterwards on the modified script, so be prepared to make a backup copy of the script before your changes, do some self debugging, and revert back and forth as needed. We can always look at the problem if you've reverted to the default script and it still happens.

    You will need to be familiar and comfortable with ASP to do this. Around line 2683 (in the latest script), you will find some code which prints out the <a href= link. You need to change this to specify the target=, class= and rel= attributes as you need them.

    You will also need to add the jquery and other ajax scripts that are needed to the page, most likely just by adding them to the search_template.html file without further changes to the "search.asp" file (best to minimize your changes there so it's easier to roll back potential problems, etc.)

    To use your customized search.asp file, save it in a different folder than the Output Directory, and then change your zoom configuration under "Configure"->"Advanced" to enable "Specify my own path for the script source code" and point this to the folder containing your modified search.asp file.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      There's the rub, I am very uncomfortable with ASP, but thanks for the advice. I think that might have to be "extra" once I get everything else sorted. Maybe there is someone out there viewing the post who might be able to point me in the right direction

      Comment

      Working...
      X