More Accessible Search
-
Mark Johnson
- Propeller Head
- Posts: 21
- Joined: Fri May 25, 2007 9:32 am
- Location: Eden Prairie, MN
More Accessible Search
Right now our company is looking into ways to give users more direct access to Flare's Search function. Yes, users think the text box above the content window is there to search the entire manual. Then, some don't find the search button until they call Customer Support. Is there a way to place a comprehensive search field into the body of a topic. For example, a Google-like search query as the opening topic and nothing else. Is there any way to do this?
If not, is there any way to edit/remove that misleading text search box above the content window (or replace it with a comprehensive search text box)?
Thanks for your help,
Mark
If not, is there any way to edit/remove that misleading text search box above the content window (or replace it with a comprehensive search text box)?
Thanks for your help,
Mark
You do not have the required permissions to view the files attached to this post.
-
doc_guy
- Propellus Maximus
- Posts: 1979
- Joined: Tue Nov 28, 2006 11:18 am
- Location: Crossroads of the West
- Contact:
Re: More Accessible Search
First, Mark, that is a GREAT idea. I love the idea of a search page. Submit that as a feature request, because I don't know of an easy way to do it, and a simple "search" proxy would be perfect for this, and MadCap could do it programmatically.
You can remove the search box in in the skin settings. I've done that in mine.
Open the skin. Open the WebHelp Toolbar tab. Move the "QuickSearch" option to the Available column.
Hope this helps!
You can remove the search box in in the skin settings. I've done that in mine.
Open the skin. Open the WebHelp Toolbar tab. Move the "QuickSearch" option to the Available column.
Hope this helps!
Re: More Accessible Search
I put in a request for a similar function, because I couldn't figure out how to make a CSH call to the index, glossary, or search tabs. I ended up having to create four skins in my project with each one having a different accordion tab set as the default tab. Then in my CSH call I appended the skin name to the CSH call so that it would open the help to the appropriate tab.
That said, you can probably do something similar as a workaround. Create a custom button and give it a name like "Search All". In the onClick field for that button, insert code to make a CSH call to the skin that has the search tab as the default tab. It's not as elegant as having a search "page", but it does bring up the search accordion, which will at least give them a search field and gets them familiar with using the accordion tab.
BTW, I hide the quick search tab in the toolbar because it causes too much confusion. People can use the browser's find capabilities if they want to find a term in a single topic.
That said, you can probably do something similar as a workaround. Create a custom button and give it a name like "Search All". In the onClick field for that button, insert code to make a CSH call to the skin that has the search tab as the default tab. It's not as elegant as having a search "page", but it does bring up the search accordion, which will at least give them a search field and gets them familiar with using the accordion tab.
BTW, I hide the quick search tab in the toolbar because it causes too much confusion. People can use the browser's find capabilities if they want to find a term in a single topic.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
doc_guy
- Propellus Maximus
- Posts: 1979
- Joined: Tue Nov 28, 2006 11:18 am
- Location: Crossroads of the West
- Contact:
Re: More Accessible Search
I spent quite a while working on this today, and I'm not enough of a coder to make this work. But if you know enough, or if you have a coder on your end who you can get to look at it, consider this:
The Search accordion is nothing but another HTML page. In fact, you can view the source of the page and see exactly what code runs that page. Basically there is a search box in an input field. When the search button is clicked, it activates a javascript function in an external javascript file. That javascript file is pretty complex, and handles more than just search results, but filtering as well.
I tried copying the search page HTML source into a topic in Flare. Then I added that topic to my TOC and built the WebHelp project. This doesn't work for me; when I click the search button, I get nothing. But I'm thinking that if you have somebody who can plow through the javascript file, you can figure out exactly what parts will get the search results you want, and you can direct the results to wherever you want. If I dug around longer, maybe I'd be able to figure it out, but there is no reason why it shouldn't be possible. In theory, you're doing the same thing as the Search page does: calling on the Javascript which does the search and outputs the search results to a page.
Maybe that will help give you a starting point to get what you want.
BTW, if you figure it out, I'd love to know how you did it, because I would totally implement this into my help system.
The Search accordion is nothing but another HTML page. In fact, you can view the source of the page and see exactly what code runs that page. Basically there is a search box in an input field. When the search button is clicked, it activates a javascript function in an external javascript file. That javascript file is pretty complex, and handles more than just search results, but filtering as well.
I tried copying the search page HTML source into a topic in Flare. Then I added that topic to my TOC and built the WebHelp project. This doesn't work for me; when I click the search button, I get nothing. But I'm thinking that if you have somebody who can plow through the javascript file, you can figure out exactly what parts will get the search results you want, and you can direct the results to wherever you want. If I dug around longer, maybe I'd be able to figure it out, but there is no reason why it shouldn't be possible. In theory, you're doing the same thing as the Search page does: calling on the Javascript which does the search and outputs the search results to a page.
Maybe that will help give you a starting point to get what you want.
BTW, if you figure it out, I'd love to know how you did it, because I would totally implement this into my help system.
Re: More Accessible Search
I've done this in my help - i.e. have a search box in a page.
I couldn't figure out how to hack the bits out of the search panel, my method involves using the the CSH search functionality.
Stick this code in a topic.
What it does is to take the text you type in, and then it makes a CSH call with the search text, which is opened in the parent frame.
For example, if you type in hello, it'd open the help using the URL ../Default_CSH.htm?hello#1
One bit you may need to change is the path to your help CSH page from the current topic.
In my project the topic is in the Content folder, so the path to the CSH file is one folder above that at ../Default_CSH.htm
The + '#1' part of the searchurl is optional. It adds a #1 to the URL, which means that the topic with the ID of 1 is displayed with the search results.
In my help I have a topic with some help on using the search. I set that topic's ID to 1 (in the alias file), so that topic is displayed next to the search results (rather than the first topic in the help).
I couldn't figure out how to hack the bits out of the search panel, my method involves using the the CSH search functionality.
Stick this code in a topic.
Code: Select all
<script type="text/javascript">
function searchHelp(url)
{
var searchurl = '../Default_CSH.htm?' + url + '#1';
window.parent.location = searchurl;
}
</script>
<FORM name="search" onsubmit="searchHelp(searchtext.value);">
<p>Search for help on:</p>
<INPUT type="text" name="searchtext" />
<INPUT type="submit" value="Search" />
</FORM>For example, if you type in hello, it'd open the help using the URL ../Default_CSH.htm?hello#1
One bit you may need to change is the path to your help CSH page from the current topic.
In my project the topic is in the Content folder, so the path to the CSH file is one folder above that at ../Default_CSH.htm
The + '#1' part of the searchurl is optional. It adds a #1 to the URL, which means that the topic with the ID of 1 is displayed with the search results.
In my help I have a topic with some help on using the search. I set that topic's ID to 1 (in the alias file), so that topic is displayed next to the search results (rather than the first topic in the help).
Re: More Accessible Search
Where do the search results appear? In the main topic area or in the (search) accordion pane?
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: More Accessible Search
The search accordion pane.LTinker68 wrote:Where do the search results appear? In the main topic area or in the (search) accordion pane?
-
Adrian Durand
- Propeller Head
- Posts: 75
- Joined: Fri Feb 17, 2006 6:33 am
- Location: Midlands, UK
Re: More Accessible Search
Dave,
I love the idea, but for a total novice, could you please explain exactly how to get this working.
i.e. Do I need a text box, or another type of field in the topic to run the search?
Yours Hopefully
Adrian
I love the idea, but for a total novice, could you please explain exactly how to get this working.
i.e. Do I need a text box, or another type of field in the topic to run the search?
Yours Hopefully
Adrian
Re: More Accessible Search
All you need to do is:Adrian Durand wrote:Dave,
I love the idea, but for a total novice, could you please explain exactly how to get this working.
i.e. Do I need a text box, or another type of field in the topic to run the search?
Yours Hopefully
Adrian
1. Open a topic in the text editor (right-click, Open with > Internal text editor).
2. Copy and paste the code above into the topic (somewhere inside the body tag).
3. Try it out!
The script will look for a file called Default_CSH.htm, which is the default name of your help output.
You only need to change that if you've set an output file name in your target (the Output file setting on the Basic tab).
-
Adrian Durand
- Propeller Head
- Posts: 75
- Joined: Fri Feb 17, 2006 6:33 am
- Location: Midlands, UK
Re: More Accessible Search
Many thanks, will give it a go...
Regards
Adrian
Regards
Adrian
Re: More Accessible Search
To expand on what Paul mentioned earlier, you can not only remove the search box from the toolbar (which I think most folks have done for the very reason you stated), but you can also add a search button that will open the main search in the leftnav. Open the skin, go to WebHelp toolbar, and add "SelectSearch" (and remove "QuickSearch" to get rid of the topic search text box). It's cludgier than just having the text box search the entire project, but much less confusing.
I decided to use a homemade search icon, as you can see in the attached image, but you could use an icon with the word "Search" to make it even easier to find. It should help cut down on users calling to find the search feature.
-Bob
I decided to use a homemade search icon, as you can see in the attached image, but you could use an icon with the word "Search" to make it even easier to find. It should help cut down on users calling to find the search feature.
-Bob
You do not have the required permissions to view the files attached to this post.
Bob Buchko
Technical Communicator
Corporate Trainer
Flare Noob
Technical Communicator
Corporate Trainer
Flare Noob
-
Mark Johnson
- Propeller Head
- Posts: 21
- Joined: Fri May 25, 2007 9:32 am
- Location: Eden Prairie, MN
Re: More Accessible Search
Thanks all for the helpful advise. I have successfully removed the QuickSearch. Regarding the search field within a topic, Dave, your solution might be what I need, but I still can't quite get it working.
I have used Flare's text editor to paste the code into the body of a topic. I replaced "Default_CSH.htm" with my project name. After compiling, the text box and search button appear. But, a query always responds with a "File Not Found." The error is looking for <productname>_CSH.htm?<query>#1
Maybe I'm misunderstanding what this actually does...What is the difference between the CSH search functionality and the regular search functionality from the Search button in the accordion?
-Mark
I have used Flare's text editor to paste the code into the body of a topic. I replaced "Default_CSH.htm" with my project name. After compiling, the text box and search button appear. But, a query always responds with a "File Not Found." The error is looking for <productname>_CSH.htm?<query>#1
Maybe I'm misunderstanding what this actually does...What is the difference between the CSH search functionality and the regular search functionality from the Search button in the accordion?
-Mark
-
doc_guy
- Propellus Maximus
- Posts: 1979
- Joined: Tue Nov 28, 2006 11:18 am
- Location: Crossroads of the West
- Contact:
Re: More Accessible Search
The CSH call for search utilizes a variable in the URL call that performs a search on the help system. So by using this variable, you pass the search parameter to the help system through the URL call.
This is different than the native help hall from within Flare which uses JavaScript, and which doesn't use the URL call to perform the search. After that, I don't know what the differences are.
This is different than the native help hall from within Flare which uses JavaScript, and which doesn't use the URL call to perform the search. After that, I don't know what the differences are.
Re: More Accessible Search
Did you include ../ in the path? i.e. ../<productname>_CSH.htm?<query>#1Mark Johnson wrote:I have used Flare's text editor to paste the code into the body of a topic. I replaced "Default_CSH.htm" with my project name. After compiling, the text box and search button appear. But, a query always responds with a "File Not Found." The error is looking for <productname>_CSH.htm?<query>#1
If your topic is in the Content folder, then you need to tell it to look in the parent folder for the <productname>_CSH.htm file (which is what ../ does).
-
Mark Johnson
- Propeller Head
- Posts: 21
- Joined: Fri May 25, 2007 9:32 am
- Location: Eden Prairie, MN
Re: More Accessible Search
Oh, yes, my topic was buried two subfolders deep. I moved it into the Contents folder and all is well. This appears to work beautifully. Many thanks! -Mark
Re: More Accessible Search
Flare's got one pretty good built-in Webhelp search function.
If you submit your bug feedback request here, the more likely it'll get fixed or included in a future release
Open Utilities PageLayout Resizer for Flare/Blaze | Batch builder
Open Utilities PageLayout Resizer for Flare/Blaze | Batch builder
