16 Replies Latest reply on Jul 11, 2006 9:23 AM by HannahGruen

    Making topics unsearchable?

      How do I make topics unsearchable? For example, there are some topics that are pop-ups. They only appear when you click on an image map. I don't want these to come up when the user does a search. These topics have no keywords associated with them. Any suggestions?
        • 1. Re: Making topics unsearchable?
          RoboColum(n) Level 5
          Hi ConnectionsAcademy and welcome to the forums. Click here for details on how to do this.
          1 person found this helpful
          • 2. Making topics unsearchable?
            Thanks for the link, Colum. However, I can't find information on making topics unsearchable on that page. (It did, however, answer my other question). Do I have to make these "pop-up" topics baggage files? It doesn't appear to allow me to do this in the hyperlink dialog box for the image map.
            • 3. Re: Making topics unsearchable?
              RoboColum(n) Level 5
              Sorry. Wrong link. I must have been in a hurry to get home last night Try this one instead
              1 person found this helpful
              • 4. Re: Making topics unsearchable?
                I tried all of the steps listed on that link. It doesn't seem to be working properly. There are a couple of issues.

                1) When I rename an HTM file as an XHTM file, it importants with the following naming convention: filename.XHTM.htm. Not sure if that gets around the RoboHelp engine.

                2) The RoboHelp image map hyperlink dialog box does not give me the option of linking to a baggage file as an auto-sizing pop-up. (Note: I'm using X5.) It only allows me to link to a "file" (there is no baggage file option, only a generic "file" option) in a new frame/window. Do I need to add javascript to the link field to get around this?

                Thanks!
                • 5. Making topics unsearchable?
                  Roger N Level 2
                  ConnectionsAcademy, Colum -

                  Here's a Javascript solution. Prefix the filenames with say, 'popup_', add this script, and you've got it. It assumes you're working in RoboHtml. Use your own prefix for 'Search_noShow' if needed, of course.

                  Try this:

                  1) add the text 'popup_' to the front of each file you wish to hide.

                  2) open whfhost.js and find the function displayTopics();

                  3) Replace the part of that function that looks like this, in the first snip, and replace it with the second, prettier script.
                  :
                  • 6. Re: Making topics unsearchable?
                    CraigCC Level 2
                    And another tweak.....no harm in having choices. I

                    This is how I hide topics from the webhelp search tab. It is a manual process, but we only run through the process/tweak before major builds. Its not as daunting as it first seems. I think that this may trick may have originated from the good RoboWizard but I don't have the time to find the source of this trickery right now (apologies if there is an element of plagiarism Rick).

                    How to exclude the pop up topic from the search:.

                    1. Generate the project.
                    2. Go to the webhelp/publishing folder. Copy the files (e.g. popup_xyz.htm etc). that you wish to exclude form the search to a nice safe location You'll need these files later.
                    3. Now set up a new conditional tag in your project (e.g. not_in_search).
                    4. Apply this conditional tag to the topics you wish to exclude form the search (e.g. popup_xyz.htm etc).
                    5. Delete the entire contents of the webhelp output folder.
                    6. Generate the project again (this time, make sure your build expression excludes the topics that you have marked with the conditional tag e.g not_in_search).
                    7. Once the generation process is complete. Copy the files that you put in nice save location (e.g. popup_xyz.htm etc to the webhelp output folder).
                    8. Run your help and the popups will not appear in the search.

                    Note: This tweak needs to be run every time you want the topics excluded, so you may just prefer to do it when you area about to ship a version of your help system.

                    Kind Regards
                    Craig
                    • 7. Re: Making topics unsearchable?
                      Roger N Level 2
                      I like the Javascript solution because its quick and easy. Its really only two steps, but I dragged out #2 into two.

                      It wouldn't take much to build that script into a process that returns the search topics in order of relevance, and knowing the path allows further customization to provide context, if need be. One could put in icons to depict the category.

                      ...and, my small 'adjustment' in the script can be implemented with the click of a button with

                      ReplaceEm .
                      • 8. Re: Making topics unsearchable?
                        Can you elaborate on the javascript solution a bit? Where is the original script found? Am I altering code on the page that calls the pop-ups? (i.e. the image map page). Thanks so much for your guidance.
                        • 9. Re: Making topics unsearchable?
                          Roger N Level 2
                          CA -

                          Sure. You'll be altering a script found in a .js file that displays the topics in the Search pane. Basically, you're telling the displayTopics() function to skip files with your special 6-character prefix. You don't need to alter the way you call your popups, just change the filenames of the files to hide, and add the bit-o-script to the .js file at the Webhelp root.

                          1) add the text 'popup_' to the front of the filename of each file you wish to hide. Or, use your own term to denote hidden files.

                          2) In the generated WebHelp folder, open whfhost.js; find and edit the function displayTopics();

                          3) Replace the part of that function found in whfhost.js that looks like the first snip, and replace it with the second, prettier script.
                          • 10. Re: Making topics unsearchable?
                            Roger N Level 2
                            Forgot to mention - there are two almost identical lines, one version for testing on your workstation, the second to actually use when posting on the server. Move the comment slashes from the second to the first version before you post it online.

                            var Search_xstart = Search_URL.lastIndexOf("\\") + 1 // TEST LOCALLY - start of filename -
                            // var Search_xstart = Search_URL.lastIndexOf("/") + 1 // USE WHEN ONLINE - start of filename -

                            • 11. Re: Making topics unsearchable?
                              The javascript alteration seems to work. There was one small problem. When I tried to put "popup_" in front of the filename for some of the topics, it defaulted to an uppercase "P." I tried changing it manually, but it kept returning to the uppercase format. It didn't seem like it occurred with all the topics, either. Any ideas?
                              • 12. Re: Making topics unsearchable?
                                Roger N Level 2
                                CA -

                                Not sure what you're seeing there, but if you make your changes to the filenames in the RH explorer window, RH will keep track of the changes and adjust the corresponding hyperlinks. Ultimately, you have an option to generate the output filenames as all lower case, and, except for Unix servers, case in filenames doesn't really matter anyway.
                                • 13. Re: Making topics unsearchable?
                                  HKabaker Level 2
                                  One litte twist:

                                  When you change the name of a file in RH, it doesn't recognize a change in case. So you should start by renaming it Pop_...... and save the project. Then change the file name to popup_..... and RH will save the lower case name.

                                  Maddening, isn't it?

                                  Harvey
                                  • 14. Making topics unsearchable?
                                    HannahGruen
                                    Hi Roger and Crag,

                                    First of all, thanks very much for providing such useful and elegant tricks! I like a "simpler is easier" approach, especially when I have to pass a project off to the client for them to maintain.

                                    Now onto my difficulties in getting either solution to work.

                                    A primer: I have two files that I'd like to hide from search. One file is linked to via a toolbar button The other file is called as a popup from multiple documents. My output is WebHelp.

                                    I first tried the javascript solution as it seemed the simplest for my client to replicate. Unfortunately, I haven't been able to get it to work. Here's what I've done:

                                    1. Renamed the two files using the prefix nsrch_
                                    2. Generated the WebHelp
                                    3. Opened whfhost.js and replaced the code as directed
                                    4. Changed the prefix in the code to my own prefix (nsrch_)
                                    5. Tested offline (didn't work)
                                    6. Tested online (still didn't work)

                                    I did comment out the appropriate line depending on where I was testing. Still no go. Any insight into the matter would be most appreciated!

                                    Now onto the equally nifty Conditional Build trick. I tried it and it works beautifully! Unfortunately, there's one big caveat. When I generate the WebHelp, the links to the pop-up file from the topics themselves are not generated. So, while my file is nicely hidden from the search engine, it's also hidden from the topics themselves. Gah!

                                    Any ideas? I'm starting to wear a thin patch on my head from all the head-scratching and hair pulling

                                    Thanks in advance!

                                    kindest regards,


                                    Hannah ^_^

                                    EDIT: I found a slightly different version of Crag's method here and, using the associated TechNote, I was able to get it to work! Yay!

                                    However, I'm still immensely interested in getting Roger's method to work. Although the above method is easy once you know what you're doing, I'd rather a method with less steps like Roger's as it's my clients that have to ultimately do the work in the long run
                                    • 15. Re: Making topics unsearchable?
                                      Roger N Level 2
                                      Hi Hanna -

                                      Its hard to say without seeing the script. Do you get an error message, or do the topics just show up? Do you have it posted somewhere we can look at it? If not, feel free to send it to my profile address, or robohelp@gmail.com.
                                      • 16. Re: Making topics unsearchable?
                                        HannahGruen Level 1
                                        Hi Roger,

                                        Thanks for the quick response and offer of help! My apologies for the vagueness of "no go." By that I meant, the topics were still showing up in the search results.

                                        Not that it much matters now as I was finally able to get it to work . As I'm not able to provide a link to my project (non-disclosure agreement and all), I prepared an example test project to show the problem. Trouble was, the test project worked flawlessly. So, much re-generation, text-editing, and clearing of caches later, it works like a charm on my real project, too!

                                        No idea what the heck I was doing yesterday that caused the grief. Maybe too-much/not-enough coffee in the afternoon. Heh

                                        Anyways, thanks again, to you both. It's great to have both methods available for future projects. Hopefully Adobe will address this in a future release! (And yes, I've already submitted a feature request )
                                        1 person found this helpful