Hi, thanks for this module.

How does it work ?

- The kernel module "Tour" is it required ?
- How to create multiple tour ? I only managed to create a single visit with several tip.
- How to organize the tip ? there is nothing to change their positions in the tour.
- The tour starts automatically when the page is loaded. How to disable this ?
- How to start the tour manually ?

Comments

zenimagine created an issue. See original summary.

zenimagine’s picture

Issue summary: View changes
mqanneh’s picture

Assigned: Unassigned » mqanneh

@zenimagine to answer your questions:

  • The kernel module "Tour" is it required ?: This is a standalone module which is not dependent on the core tour module.
  • How to create multiple tour ? I only managed to create a single visit with several tip.: At this time this module provides only one tour with multiple tour tips. Tour tips can be considered as a separate tour if they were on a separate pages.
  • How to organize the tip ? there is nothing to change their positions in the tour.: This will be available in the next release or the one after that, currently tour tips appear in the same order they appear in the backend configurations form.
  • The tour starts automatically when the page is loaded. How to disable this?: Check the code below.
  • How to start the tour manually ?: Check the code below.

The default behaviour of the tour is to start automatically on page load, if you to override that you can use the following code:

var tourObject = drupalSettings.bs_tour.currentTour;
if (tourObject && tourObject._options.steps.length) {
  // stop the tour.
  tourObject.stop();

  // start the tour.
  tourObject.start();
}

You can add the previous code to your jQuery code, ex: button.onClick();

Please let me know if this answered your questions.

zenimagine’s picture

Thank you for your answers, I will test it tomorrow.

Why did you create a new module and not create a D8 version of the next module ?

https://www.drupal.org/project/bootstrap_tour

The D7 module offers a check box for the automatic launch of Tour when the page loads.

The module D7 proposes a box to inform the path of the visit, which makes it possible to create several Tour.

mqanneh’s picture

I didn't use that module because this one is a new module that started from scratch without using any code from the previois one.

so it won't help to start the 8.x branch at the same old module with a different experience.

zenimagine’s picture

I currently have the modules "Tour" and "Tour UI" to install.
I created a custom block to launch "Tour". How to modify this block to launch "Bootstrap Tour" ?

<a class="btn btn-success btn-sm" href="/?tour"><i class="fa fa-compass fa-lg"></i> Visite</a>

zenimagine’s picture

I am not an expert in programming ;-)

For example to open the menu on the right I created a custom block containing :

<button type="button" class="navbar-toggle-first">
  <i class="fa fa-bars fa-2x"></i>
</button>
<button type="button" class="navbar-toggle-first-link" data-toggle="collapse" data-target="#navbar-collapse-first">
  <span class="sr-only">{{ 'Toggle navigation'|t }}</span>
</button>

Can I create a custom block like this to start "Tour" ?

If so, can you tell me what to enter in this block ?

Do you want to create a "Tour" block with the next version of the module ?

mqanneh’s picture

Add any button or link to yoir block template then trigger the jQuery code I sent you in my previous comment on clicking on this button.

check jQuery Click for more information.

zenimagine’s picture

Thank you. One last thing.

It would be nice to allow negative values for padding.

mqanneh’s picture

Why would you use a negative padding for the highlighted element?

highlighting padding is intended to use when you want to highlight a dom element, it's not intended to be negative.

check http://bootstraptour.com/api/

zenimagine’s picture

I open the separate problem of this post with more detail

mqanneh’s picture

@zenimagine please don't create separate issues. no need to have 5 issues for support request.

let's make the discussion on one place.

zenimagine’s picture

Sorry, I thought I'd do well.
This post dealt with several problems, I thought you would close this one and let others open. This will have facilitated follow-up.

zenimagine’s picture

I did not manage to create the block to manually launch the visit

<button class="btn btn-success btn-sm" data-role="start"><i class="fa fa-compass fa-lg"></i> Commencer la visite</button>

<script>
var tourObject = drupalSettings.bs_tour.currentTour;
if (tourObject && tourObject._options.steps.length) {
  // stop the tour.
  tourObject.stop();
  // start the tour.
  tourObject.start();
}
</script>
zenimagine’s picture

could you give the code to start the visit in a personal block?

Or create a block with the module ?

Because there is no way to launch the visit manually and it is a real handicap for this module.

It's a shame because the module is interesting.

mqanneh’s picture

Status: Active » Fixed
var tourObject = drupalSettings.bs_tour.currentTour;
if (tourObject && tourObject._options.steps.length) {
  // start the tour.
  tourObject.start();
}
mqanneh’s picture

Status: Fixed » Closed (fixed)
coaston’s picture

StatusFileSize
new8.73 KB
new30.84 KB

Hello,

Iam trying to configure that tour for my web side for alsmost 2 days. What I am doing wrong? Just simple test attached:

Only local images are allowed.
config

I cannot see any Message (tip) there should be "Hello" displayed.

zenimagine’s picture

The last update of the Bootstrap Tour library is over 3 years old.
This bookstore seems to be totally abandoned.
Why don't you create a module, to adapt the Drupal kernel "Tower" module to the Bootstrap theme ?