18 Replies Latest reply on Sep 18, 2006 8:56 AM by Roger N

    Accessing Robohelp search

      Hi,

      I am running a search on a companies website. The search current searches the forum. However i would also like it to search the Robohelp search as well.

      I know the search is done using javascript, but i don't know a lot of javascript. Could someone advise me as to how to pass search strings into RoboHelp and return an array of the results? Or how robohelp conducts it's search that i might be able to ultilise.

      Thanks

      Daniel
        • 1. Re: Accessing Robohelp search
          Peter Grainge Adobe Community Professional (Moderator)
          Welcome to the forum.

          You say the search currently searches the forum. Not sure if that is relevant without knowing what forum you are talking about.

          Unless I am misunderstanding you, you don't search a search. Why don't you just run whatever search tool you are using on the intranet?

          Hope that helps, if not perhaps you could clarify what you are doing.

          • 2. Re: Accessing Robohelp search
            Hi,

            Thanks for the reply. I'll try and clarify myselft a bit more.

            Basically I have a search which search's my forum. My forum is one i built myself using MS SQL Databases.

            Basically i notice that the robohelp search indexes the html files into XML files. It then runs the search on the XML files (is this correct?). I just wondered if it was at all possible to pass a string into the robohelp javascript so that the robohelp indexes are searched as well. Then getting robohelp to pass me an array of the results with i can parse into a page.

            Basically i wanted a search that would search the Robohelp files at the same time my users search the forum. So ideally i would of used the same querystring and pass it to robohelp to return the results. However it's not particually clear how robohelp takes in search arguments. Or how robohelp passes back the results.

            Does anyone have and ideas if this is possible or how its done?

            Hope this clarifies my question a bit.

            Thanks

            Daniel

            Furthur information:

            Using ASP.NET (2)
            C#
            Robohelp webhelp
            • 3. Re: Accessing Robohelp search
              Peter Grainge Adobe Community Professional (Moderator)
              OK. I cannot answer your questions about how the RH search works but I am wondering why your are approaching the task this way. I have an intranet that comprises various HTML files, PDF files. DOC files and webhelp outputs.Why not let the search engine you are using trawl through the RH output as well.

              In my case I had to exclude those files for other reasons but the search engine worked quite happily across the whole lot. For that reason I come back to my point about why pick up the RH search results, let your other search engine do the whole lot.

              Ah! Reading your reply again it is because you want the index words to get picked up and those might not be in the topics. Given that RH's own search does not find the index terms, I cannot readily see how you would get what you want. I presume you are aware the index is held in the .HHK file, can you see a way of harnessing that file?

              Sorry I cannot give a specific answer but hopefully this information is of some help.

              • 4. Re: Accessing Robohelp search
                HKabaker Level 2
                Daniel,

                If Peter is correct -- that you have some index keywords pointing to a topic that doesn't have the keyword in the text -- isn't that confusing? When I follow a link and can't find the term on the page, I conclude:
                1. The search is faulty, or
                2. The search found the term in Metadata but not in the page. This is a common way of luring a searcher to a related page (or almost related, and sometimes not related at all).

                If you're not content with searching .htm files, you could look at whidata0.xml in the whxdata output folder. (HHK is a project file only.) If the index is large, you may have whidata1.xml, 2, and so on.

                If there's a hit on a "key name" you could pick up the relative URL in the following line, build the complete URL and return it to the search results.

                Maybe it's doable, but is it worth the trouble?

                Harvey

                1 person found this helpful
                • 5. Re: Accessing Robohelp search
                  Hi,

                  Is it just me or did i think this was going to be simple?

                  I thought it would just be a simple case of passing a string into the javascript of RoboHelp and RoboHelp returning an array of files matching the string.

                  Even though i could open up RoboHelps files and search them myself. I would of thought it would be easier to let RoboHelp handle all the code side.

                  I'll explain my thinking behind what i was going to do, it might make it a bit clearer. Currently i have a smal little SQL routine which searches my forum. However i wanted the user to be able to search the forum and the knoelwdgebase (RoboHelp) at the same time. I know RoboHelp has a built in search and im aware it uses files to store the information for the pages. Therefore i was planning to find the javascript search rountine. Call it from the website search page pass in the current search string. Then pass the results backout using a asp.repeater. So essentially do what robohelp does anyway but without using their interface.

                  Peter, you mentioned about using a search engine to search the HTML files. However i don't have a search engine and i don't want one. The site is secure, and it's a security risk to have links to files which users who don't have the right privilages can't actually get to. It's also a security risk to show a breif discription (like Google) for each page. That is unless i build my own search engine (but then it just gets too complicated :( ).

                  Anyway thanks for you guys helping me!

                  I hope this clears up what i am trying to achieve. I think it all got a bit confusing, becuase i honestly don't understand what you guys are saying :S

                  Thanks,

                  Daniel
                  • 6. Re: Accessing Robohelp search
                    HKabaker Level 2
                    Daniel,

                    I think you could do what you're suggesting if you could get into the RH application code, which may be problematical.

                    Does your "little SQL routine" qualify as a search engine? Could it be applied to the knowledge base? Could you put the contents of the knowledge base into the same form and location as the forum?

                    I ask these questions because I don't know the answers. If any SQL programmer would know this without asking, please don't chuckle. Or go ahead, chuckle.

                    H
                    • 7. Re: Accessing Robohelp search
                      Hi,

                      (I feel like everybody who knows SQL is going to laugh when i say this) I'm just using a LIKE command in SQL (It works!). So i don't think it's even close to a search engine. I could build the whole knowledge base in a database. But unfortunatly the client wants to use Robohelp, so im stuck with this problem.

                      I don't really understand why it isn't simple. I can interface with pratically any search enigne these days. So why not RoboHelp?

                      Daniel
                      • 8. Re: Accessing Robohelp search
                        RoboWizard Level 4
                        Hi Daniel

                        I think the issue with RoboHelp search is that it's not just another generic search engine you can plug into or whatnot. It's a combination of extensive and rather elusive JavaScripting magic.

                        From a casual observer of this thread standpoint, since WebHelp is pretty much just another web site, I'm failing to understand why fellow Adobe Community Expert Peter's suggestion wouldn't work. Use one of these "easy to connect" search engines to trawl the RoboHelp stuff. And before you ask if I saw the part about your security concerns, I did read that. However, I inferred you are more concerned with the information in the forums than what you have in your WebHelp system.

                        Cheers... Rick
                        • 9. Re: Accessing Robohelp search
                          Hi Rick,

                          I agree the Javascript is a bit elusive and does seem to work magically!

                          However i am actually more concered with the information stored in the Knowledge Base rather than the Forum. I can't risk having a search engine search the Knowledge Base because of the security risk. The knowledge base contains very sensitive information. So i can't really thanks for your suggestion though.

                          If someone could just explain how the string gets passed from the search bar, at the top, to the left hand frame. Then I could utlise this.

                          Thanks

                          Daniel
                          • 10. Re: Accessing Robohelp search
                            Peter Grainge Adobe Community Professional (Moderator)
                            Daniel

                            <quote>If someone could just explain how the string gets passed from the search bar, at the top, to the left hand frame. Then I could utlise this.</quote>

                            We cannot, this is what we have been saying all along. As Rick has explained, it's all done via some complex javascript. We are all authors, not developers.

                            <quote>I can't risk having a search engine search the Knowledge Base because of the security risk. The knowledge base contains very sensitive information.</quote>

                            The RH search is doing exactly that, searching your RH project, which is the Knowledge Base. What is the difference between RH seaching it and some other tool?

                            Something is getting lost in this thread.

                            - At the beginning, you said "I am running a search on a companies website. The search current searches the forum. However i would also like it to search the Robohelp search as well."

                            - Now you say "I can't risk having a search engine search the Knowledge Base because of the security risk."

                            Well do you want a combined search or not, was my thinking. It all seemed crazy so I tried to make some sense of it. Are you thinking that when we say Search Engine we are talking about Google or Yahoo? If so, we are not. What we are talking about is something like Zoom Search from http://www.wrensoft.com. You download a search tool configure it how you want, include and exclude stuff, and then make those results available via your own search page.

                            If this is not the problem, then please start again with some very clear explanations of the issues involved. We want to help you but this is just going around in circles.

                            • 11. Re: Accessing Robohelp search
                              Hi,

                              I agree it is going round in circles. Thanks for your help though!

                              Sorry i didn't know any of you guys weren't developers. I just thought that there would be developers posting on the forum who could explain it all to me. You mention the search engine, Zoom Search, it looks good, orginally i did think that you ment using the google site search, my mistake.

                              However i would still like to know how it works, just a matter of annoyence now. Being on a computer science degree at university just means i need to know or it's going to drive me crazy! Would anybody know how to contact any of the developers?

                              Thanks for all your help. Sorry it got a bit complicated all i can say is if i didn't know you weren't developers!

                              Daniel
                              • 12. Re: Accessing Robohelp search
                                Peter Grainge Adobe Community Professional (Moderator)
                                No problem Daniel. I wish we could help more. The only way you could theoretically get at the developers is a paid support call. However, first they might look at this as a sort of reverse engineering question but more fundamentally there has been a change of crew so it might be difficult to get to the right person.

                                • 13. Re: Accessing Robohelp search
                                  HKabaker Level 2
                                  Daniel,

                                  I don't know for sure, but I think the RH search engine is compiled into one of the application files that's not easy to break down.

                                  Maybe, though, it's in a combination of .js files and the search words database.

                                  If you like solving puzzles, here is some information.

                                  The databases for full-text search are in the WebHelp output folder's subdirectories whdata, whgdata and whxdata. This assumes that you chose to generate DHTML > Java Applet > Pure HTML>.

                                  I say databases because RH chooses one based on the browser's identity. Some earlier versions of IE, and current versions of other browsers, can't / don't make use of WebHelp's flavor of DHTML, for example.

                                  You might start with whfts.xml, which is the base directory for one of the databases. Search all .js files (maybe .htm, too) to see if whfts.xml is referenced. (If we can trust the RH file name convention, you might find something in a file with "fts" or "whf" in the file name.)

                                  If you come up with a file to look at, you can trace back to the javascripts associated with this file. And so on.

                                  That's how I solved a few problems related to the way alternative browsers display (or don't display, or screw up the display of) WebHelp frames.

                                  And I'm just an author who likes to learn by mucking around in html and js code.

                                  Please post back with any results. Good luck.

                                  Harvey

                                  • 14. Re: Accessing Robohelp search
                                    Peter Grainge Adobe Community Professional (Moderator)
                                    Daniel

                                    Please email me offline. Click my username.

                                    • 15. Re: Accessing Robohelp search
                                      Thanks for your replay Harvey.

                                      Fortunatly i love puzzles :)

                                      I havn't been at the office for the past couple of weeks (were robohelp is held) and my VPN doesn't want to work currently :s otherwise i could past the javascript code. Basically i have found the routine that does the search it is located in one of the .js files in the webhelp i basically went through all the .js files to find it. I will let you know what file it is as soon as i get my VPN working. However from memory i don't know how it produces the results. I would of thought it would be done in an array. However it isn't so i have no idea.

                                      I'll keep you posted.

                                      Daniel
                                      • 16. Re: Accessing Robohelp search
                                        Roger N Level 2

                                        The search process in WebHelp isn't so much magical, as practical. It's an indexed search, so it makes some concessions for speed, expecially helpful when the project gets large.

                                        It is complex, but for good reason. It creates 'placesholders' for each of the navigation pane functions, and fills them dynamically after the frames have loaded. So, accessing the search function needs to wait for the navpane to load. Which loads several times, actually.

                                        But, you don't need to know how a car works to drive it, so all this may be moot.

                                        Here is a script plug-in that evokes the Webhelp Search externally (larger systems seem to fail on the first load)

                                        For now, try a search for a term at a test site, http://www.800tip.com .

                                        To search for the term 'loan', click here:

                                        http://www.800tip.com?loan

                                        or, to search for the term 'editor', click here:

                                        http://www.800tip.com?editor

                                        .....and so on ... (if the links don't survive, paste them into your address bar, and search for your own terms).

                                        the method used was to call the help as above, with the query mark, and search term. But first, add the following text to the bottom of the whtbar.js file (it should look for an onLoad event, but instead I used setTimeout, set to 1250. feel free to adjust it.

                                        Also, I'm not sure how you wanted to access the results, but they are rotated through in the DisplayTopics functions, and you can always get them with a 'screen scraping'...

                                        1 person found this helpful
                                        • 17. Re: Accessing Robohelp search
                                          Level 7
                                          The search process in WebHelp isn't so much magical, as practical. It's an
                                          indexed search, so it makes some concessions for speed, expecially helpful when
                                          the project gets large.

                                          It is complex, but for good reason. It creates 'placesholders' for each of
                                          the navigation pane functions, and fills them dynamically after the frames have
                                          loaded. So, accessing the search function needs to wait for the navpane to
                                          load. Which loads several times, actually.

                                          But, you don't need to know how a car works to drive it, so all this may be
                                          moot.

                                          Here is a script plug-in that evokes the Webhelp Search externally (larger
                                          systems seem to fail on the first load)

                                          For now, try a search for a term at a test site, http://www.800tip.com .

                                          To search for the term 'loan', click here:

                                          http://www.800tip.com?loan

                                          or, to search for the term 'editor', click here:

                                          http://www.800tip.com?editor

                                          .....and so on ... (if the links don't survive, paste them into your address
                                          bar, and search for your own terms).

                                          the method used was to call the help as above, with the query mark, and search
                                          term. But first, add the following text to the bottom of the whtbar.js file
                                          (it should look for an onLoad event, but instead I used setTimeout, set to
                                          1250. feel free to adjust it.

                                          Also, I'm not sure how you wanted to access the results, but they are rotated
                                          through in the DisplayTopics functions, and you can always get them with a
                                          'screen scraping'...



                                          function searchC(passSearchString )
                                          {
                                          var onMsg=new whMessage(WH_MSG_SHOWFTS,this,1,null);
                                          SendMessage(onMsg);
                                          var oMsg=new whMessage(WH_MSG_SEARCHTHIS,this,1,passSearchString);
                                          if(!SendMessage(oMsg))
                                          gstrSearch=passSearchString;
                                          else
                                          gstrSearch="";
                                          }


                                          lngth = (top.window.location.search.substring().length);
                                          if(lngth > 0)
                                          {

                                          var passSearchString = (top.window.location.search.substring(1, (lngth)));
                                          setTimeout("searchC(passSearchString);",1250);

                                          }

                                          • 18. Re: Accessing Robohelp search
                                            Roger N Level 2
                                            another duped post; with a newsgroup label... must be my Alaska connections...
                                            1 person found this helpful