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

Set search results to all search words as default in responsive help

Participant ,
Aug 24, 2016 Aug 24, 2016

Copy link to clipboard

Copied

Hi - Can anyone help me on this please? Originally posted 24th August but no replies.

Thanks

search.png

Hi,

I am using responsive HTML5 help in Robohelp 2015. There is an option for users to tick a box for all search words for an AND search otherwise the default is OR.

Can this be set as default - so that the box is automatically ticked for an AND search?

There isn't an option for this so I guess it will require a code change but I haven't manage to locate the code yet.

Thanks

* I see the same question has been asked for Robohelp 11 but the solution given doesn't seem to work for Robohelp 2015.

http://forums.adobe.com/message/7733536#7733536

Views

842

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

correct answers 1 Correct answer

LEGEND , Oct 31, 2016 Oct 31, 2016

I looked into the output and it seems that setting the value doesn't always correctly change the checkbox value. But there is a 'workaround'. By mimicking a user interaction, you can set the AND search when the page is loaded.

In the layouts usersettings.js file, go to line 35, with the text rh.model.publish(xxxx

Add a new line below that and add the code:

setTimeout(function(){

  var rh = window.rh;

  var isAND = rh.model.get(rh.consts('KEY_AND_SEARCH'));

  if(isAND != 1) {

  var checkbox = document.g

...

Votes

Translate

Translate
Community Expert ,
Oct 25, 2016 Oct 25, 2016

Copy link to clipboard

Copied

Are there no topic.slp files in RH2015's \!Screenlayout!\ folder?

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 ,
Oct 26, 2016 Oct 26, 2016

Copy link to clipboard

Copied

Yes this seems to be the file to change but cannot quite get it to work correctly.

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 ,
Oct 26, 2016 Oct 26, 2016

Copy link to clipboard

Copied

Is the change to that file's coding having any effect on the output?

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 ,
Oct 26, 2016 Oct 26, 2016

Copy link to clipboard

Copied

it does but not the desired effect.

Users complain the search is a bit slow -it's merged help. it faster when you use AND search, rather than the default OR so making all searches AND would help.

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 ,
Oct 26, 2016 Oct 26, 2016

Copy link to clipboard

Copied

Have you looked at the customization options? From the SSL recipe, click Customize Selected Layout.

TMP1.png

Then click the Search (All) and you see settings that allow you to change behavior.

tmp2.png

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 ,
Oct 26, 2016 Oct 26, 2016

Copy link to clipboard

Copied

hi,

Yes thanks i've looked at that. That just turns off the option to select the AND search just leaving OR as the default, I believe?

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 ,
Oct 26, 2016 Oct 26, 2016

Copy link to clipboard

Copied

Hmmm, I've been playing with that setting and oddly, it seems to make zero difference in my outputs when I'm testing. Maybe I need to create a fresh layout or perhaps try with the other one.

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 ,
Oct 27, 2016 Oct 27, 2016

Copy link to clipboard

Copied

I think the checkboxes all remember the last setting you used, which would imply a cookie somewhere? So maybe you can find a jquery guru to write a script to re-tick the checkbox each time or reset the cookie? Not my area of expertise though, so just conducting a thought experiment.

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 ,
Oct 28, 2016 Oct 28, 2016

Copy link to clipboard

Copied

You can set it from code if you want to enable it by default.

In the layouts usersettings.js file, go to line 35, with the text rh.model.publish(xxxx

Add a new line below that and add the code:

rh.model.publish(rh.consts('KEY_AND_SEARCH'), 1);

Whenever the help is opened, the AND search is enabled. Only happens when the page is loaded.

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 ,
Oct 28, 2016 Oct 28, 2016

Copy link to clipboard

Copied

Hi Willam,

I tried the above on a new test project but it doesn't seem to work for me.

1.GIF

The AND search isn't enabled as default. Here's the code added:

22.GIF

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 ,
Oct 28, 2016 Oct 28, 2016

Copy link to clipboard

Copied

Hi there

Not sure if it will make a difference, but you have a space before your 1. Did you try removing that?

TMP1.png

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
LEGEND ,
Oct 28, 2016 Oct 28, 2016

Copy link to clipboard

Copied

Additionally, ensure you delete the cache?

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 ,
Oct 28, 2016 Oct 28, 2016

Copy link to clipboard

Copied

Hi,

I removed space and deleted cache but no difference.

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 ,
Oct 29, 2016 Oct 29, 2016

Copy link to clipboard

Copied

Interesting. Can you share the output with me? Adding that code on my end enable the AND search for me.

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 ,
Oct 31, 2016 Oct 31, 2016

Copy link to clipboard

Copied

Hi Willam,

Due to the problems with Update 4, I had to remove and reinstall Robohelp up to Update 3. Could be something to do with this if you have Update 4 installed?

Just to clarify, when you say the AND search is enabled, do you mean it's already checked as below:

1a.png

Thanks - happy to share the output if that will help.

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 ,
Oct 31, 2016 Oct 31, 2016

Copy link to clipboard

Copied

I'm not sure if it has to do with Update 4, but you never know...

I mean exactly what your image shown: checking AND search by default.

For the output, please contact me at: contact [at] wvanweelden [dot] eu.

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 ,
Oct 31, 2016 Oct 31, 2016

Copy link to clipboard

Copied

LATEST

I looked into the output and it seems that setting the value doesn't always correctly change the checkbox value. But there is a 'workaround'. By mimicking a user interaction, you can set the AND search when the page is loaded.

In the layouts usersettings.js file, go to line 35, with the text rh.model.publish(xxxx

Add a new line below that and add the code:

setTimeout(function(){

  var rh = window.rh;

  var isAND = rh.model.get(rh.consts('KEY_AND_SEARCH'));

  if(isAND != 1) {

  var checkbox = document.getElementById('andsearch');

  checkbox.click();

  }

  }, 1000);

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