• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Removing unused files from the user's ability to search

New Here ,
Aug 03, 2007 Aug 03, 2007

Copy link to clipboard

Copied

I have a lot of topics that I have not added to my TOC. Any of those topics could display to the user when they use Microsoft HTML Help to perform a search via its Search tab, what is the best way to remove those topics that I don't want to appear to them? Some of them are being referenced via hyperlinks so I can't just get rid of them by deleting everything that is not in the TOC.

Views

3.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

As Homer would say....

D'oh! Sorry about that! I really should get out more and read through those again.

Darn house...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

You might want to look at the third-party Zoom Search. For some helpful hints, check out Peter Grainge's tutorial.


Good luck,
Leon

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

Hi Eileen

Apologies to all if this was discussed and I missed it. I've not yet had my first cuppa and I was up late watching history unfold.

There does exist another way to exclude files.

The short of it is that you apply a Conditional Build tag to the topics that should be excluded. Then you generate the WebHelp using a Build Expression to exclude them. Copy that content to one folder of your hard drive. Generate again without the Build Expression. Now you take the navigation part and overwrite the second with the first. The end result should be a navigation structure that has no ability to search these unwanted topics.

Cheers... Rick

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

We have given up on this. XHTML files were registered on the server, and we could not find any more problems. It seems to be a combination of XHTML and the Java script on Windows Server 2003.

I am going to undo the change we made to exclude topics from the Search functionality (changing file names from XHTM back to HTM). Unfortunately our project has been translated, so I have to do this in several language versions. 😕 Lots of manual work.

I think we can conclude (until somebody comes up with a solution) that the suggested way of excluding help topics from searches will not work if the output is WebHelp to be run on Windows Server 2003.

Thanks, people, for trying to help. I will keep my eye on this in case a solution comes to light.

In the meantime, does anybody know of any OTHER way to exclude topics from the search?

Thanks
Eileen

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

Hmm, sounds interesting. Thank you for the idea.

I'm not sure what you mean by "the navigation part". I guess you mean the WebHelp files that control navigation. I'm not sure which files those are, but I guess I could figure it out.

This doesn't affect linking and such? The topics I want to exclude are bare-bones popups without titles, but there are links to them all over the place.

/Eileen

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

Hi Eileen

See if the links below help you out.
Link number one
Link number two

Cheers... Rick

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

Eileen, Rick, Peter, et. al.:

Hey, howzit goin?

Some time back, I created several scripts to filter and modify search results. Here is one to hide specific files, created in '06. I know it works for the previous version of Webhelp, but I haven't looked to see if the lastest version of the function displayTopics() has changed...

Basically, you'll alter a script found in whfhost.js that displays the Search pane, so the displayTopics() function skips files with a special prefix.

You'll: 1) add the prefix to the files to hide, and 2) add the bit-o-script to the whfhost.js file:

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 (like "hidden_").

2) In the generated WebHelp folder, open whfhost.js to the function displayTopics(); Replace the part of that function found in whfhost.js that looks like the first snip, and replace it with the second, prettier script.

Note: There are two almost identical lines in the replacement script, 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 -

Replace:

============[ SNIP : ORIGINAL SCRIPT ]===========================

function displayTopics()
{
var sHTML="";
var sLine="";
for(var i=0;i<gaTI.length;i++){
sLine+="<dt><nobr><a href='"+gaTI .sTopicURL+"'>"+_textToHtml(gaTI.sTopicTitle)+"</a></nobr></dt>";
if(i>>4<<4==i)
{
sHTML+=sLine;
sLine="";
}
}

============[ END SNIP ]========================================

with this:

============[ SNIP: REPLACEMENT SCRIPT ]========================

function displayTopics()
{
var Search_noShow = "popup_"; // 6 chars
var sHTML="";
var sLine="";
for(var i=0;i<gaTI.length;i++){

var Search_URL = gaTI .sTopicURL // search result is already escaped

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 -

var Search_xend = Search_URL.length // end of filename
var Search_tName = Search_URL.substring(Search_xstart,Search_xend) // filename

var Search_tPath = Search_URL.substring(0,Search_xstart) // path, might need it later
var Search_tNamePrefix = Search_URL.substring(Search_xstart,Search_xstart+6) // 6-char prefix


if (Search_noShow == Search_tNamePrefix)
{
}
else {
sLine+="<dt><nobr><a href='"+gaTI
.sTopicURL+"'>"+_textToHtml(gaTI .sTopicTitle)+"</a></nobr></dt>";
if(i>>4<<4==i)
{
sHTML+=sLine;
sLine="";
}
}
}

===========[ END SNIP ]======================================

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 05, 2008 Nov 05, 2008

Copy link to clipboard

Copied

Thank you, Rick, for the links to step-by-step instructions, and thank you, Roger, for the alternative solution.

Since I work in a team and we are constantly rotating projects, I don't feel confident implementing either one of those solutions right now. I believe the system would break down after the first or second switch to a different writer. And hiding specific topics isn't a top priority in my current project to push this on my colleagues. We'd need a simpler solution, like the XHTM one, to make it worthwhile.

I'll keep these possibilities in mind for future situations, though.

Thanks again.
Eileen

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2008 Nov 06, 2008

Copy link to clipboard

Copied

Drum roll for the return of Mr Nilsson. Thought you had got frozen in. :-)

Guess I'll have to play with that script. Good to see you again.

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 06, 2008 Nov 06, 2008

Copy link to clipboard

Copied

Hey Peter -

thanks, but no drum roll necessary - I'm not much for a lotta fanfare.

I've been a bit distracted lately, but life goes on.

And, <looking around>... I thought this place could use a little Javascript ....

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 06, 2008 Nov 06, 2008

Copy link to clipboard

Copied

Hi Roger

OMG!!! Is Stephanie your daughter? Is she okay?

Sorry to hear about that. I'll echo Peter's comments. Nice seeing you around!

Cheers... Rick

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2008 Nov 07, 2008

Copy link to clipboard

Copied

Roger

I am so sorry. Like Rick, I am hoping that at least your daughter is OK.
Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 07, 2008 Nov 07, 2008

Copy link to clipboard

Copied

Both Steph and Erica (she lost David, her fiance) have healed well, and Erica brought a new little one into the world: Davina Jamie Nilsson, born February 10th, 4:35am... Without daddy, I am papa. She is such a blessing, words cannot describe...

Life is good.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 07, 2008 Nov 07, 2008

Copy link to clipboard

Copied

Hey Roger

Congrats! I'm so happy to hear things turned out well. Little ones are fun, no? (I have a 5 year old grandson myself)

Cheers... Rick

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 04, 2008 Dec 04, 2008

Copy link to clipboard

Copied

Captiv8r said:
"Step behind RoboHelp's back and rename each unwanted topic from using .HTM extension to .XHTM. Then, within RoboHelp HTML, methodically add each of these to your list of Baggage Files. After you have done this, make sure anything inside RoboHelp is correctly referencing the file with the new .XHTM extension. Then recompile."

I need to do this but I don't know where my baggage files are in RH7. I can't see anything with this name although I remember having seen a Baggage File folder in previous versions of RH. Where should I be looking?

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 04, 2008 Dec 04, 2008

Copy link to clipboard

Copied

Hi there

Yes, RoboHelp 7 changed the look of things. Look in the little mini toolbar of the Project Manager pod. Click the folder icon. It probably has a little globe on it. When you click it, it will change the view to the classic view (where you see Baggage listed) and the icon should change to one that has sunglasses.

Cheers... Rick

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 04, 2008 Dec 04, 2008

Copy link to clipboard

Copied

Thanks Rick, I would NEVER have found that!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 04, 2008 Dec 04, 2008

Copy link to clipboard

Copied

LATEST
Authorgirl,

Just for safety's sake.... Did you read the whole thread and see the disadvantages of that solution?

1) XHTM files don't show up in RH Explorer. For my team that meant they tended to be forgotten during maintenance and translation, not to mention authoring (for example, linking to XHTM files has to be done by hand).

2) Popup links to XHTM topics in CHM files don't work on Windows Server 2003 when viewed using Internet Explorer 7. Nothing happens when you click them. You just see "Error on page" in the status bar (if your status bar is turned on).

If you're ok with these drawbacks, then it's a good solution. We ended up undoing our XHTM changes.

Another tip: If you at any point have problems with baggage files (such as not being able to get rid of them), you may have to delete them by hand. You can do this in the rhbag.apj file, which you can find using Windows Explorer in the main project folder. Open that file in Notepad and you'll see each baggage file listed.

Good luck
Eileen

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp