We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32391
    • 37 Posts
    Hi there,

    A client wants me to help him getting his galley to use slimbox. I’ve never used maxigallery before and after a search, I can’t find the answer to the problem.
    When you click on a thumb, the main image is opened in a new blank page. So obviously slimbox isn’t working.

    The maxigallery version is 0.5.2.
    My snippet call is:
    [!MaxiGallery? &display=`embedded` &embedtype=`slimbox` &pics_per_row=`3`!]

    I was wondering if the mootools file hadn’t been uploaded. Which files are needed to made slimbox work?

    Any help would be much appreciated.

    Thanks in advance!


      • 7923
      • 4,213 Posts
      You probably have js collisions on your page.. if you have QM enabled for example, it uses jquery js library and slimbox uses mootools.. so it’s no go. You need to disable QM or change maxigallery to use embed type that suits your setup.. wiki for example has guide how to implement thickbox. It uses jquery, so it should work together with QM.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 32391
        • 37 Posts
        I’m not sure what QM is but I don’t think there’s any jQuery running on the site. Jquery files certainly aren’t inlcuded anywhere I can see.
        I’m following the wiki anyway to install thickbox but it doesn’t say what the jquery file and the thickbox file have to be called.
        So I’m guessing
        jquery,js and thickbox.js?
        Is this right?
        Also, do I have to have phx installed?
          • 32391
          • 37 Posts
          OK ignore that last post about file names - I’m an idiot.
            • 7923
            • 4,213 Posts
            QM is the front end page editing plugin that is coming by default in Evo 1.0.

            So.. did you get it working now or not?


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 5653
              • 9 Posts
              I was having the same issue and this is how I solved it. May not work for everyone, ’cause we all run different jquery scripts, but I’m thinking it would be similar for most of us.

              I have a jquery slider, menu hover and tooltips on my site: http://www.theartsofhuntingandfishing.com When I called for Maxigallery on the homepage to display recent images, my slider, tooltips and menu hover stopped working. But the gallery worked fine.

              I found several posts about needing to load the mootools.js file before the jquery file is loaded. You can do this by adding &disable_js_libs=`1` to the Maxigallery call in your document and putting the path to the mootools.js file in the <head> of your template, before the jquery scripts. Well, I did this and my slider, menu hover and tooltips worked but now my images opened in a white page without the slimbox effect. When I removed the &disable_js_libs=`1`, the slimox worked but the others didn’t. huh

              So here’s what I did:

              I found lots of links about the noConflict stuff, but really struggled to find out where to put it!

              In my js folder there is a file called scripts.js. This file contains all the scripts for my tooltip, slider and hover so I thought maybe I was onto something. I found this file by looking in my template code to see what scripts were being served up. Most of the scripts looked like a bunch of mumbo jumbo but this one was very neat and organized.

              I placed var $j = jQuery.noConflict();
              before each script was called then changed all the $ symbols to $j

              Here is my full code after I made the changes: I only added var $j = jQuery.noConflict(); to the parts of the script that I was having trouble with (ie. hover, slider, tooltips).

              // start menu hover
              var $j = jQuery.noConflict();
              $j(function() {
              $j(’#navigation ul li’).hover (
              function() {
              $(this).addClass(’navhover’);

              }, function() {

              $j(this).removeClass(’navhover’);
              }
              );
              });

              $j(function() {
              if ( $j("#navigation ul li").hasClass("current") )
              $j(this).addClass(’navhover’);
              });


              // start slider
              var $j = jQuery.noConflict();
              $j(window).bind("load", function() {
              $j("div#sliderc").codaSlider()
              });

              // start tooltip

              /*
              * Tooltip script
              * powered by jQuery (http://www.jquery.com)
              *
              * written by Alen Grakalic (http://cssglobe.com)
              *
              * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
              *
              */
              var $j = jQuery.noConflict();


              this.tooltip = function(){
              /* CONFIG */
              xOffset = -35;
              yOffset = -50;
              // these 2 variable determine popup’s distance from the cursor
              // you might want to adjust to get the right result
              /* END CONFIG */
              $j("a.tooltip").hover(function(e){
              this.t = this.title;
              this.title = "";
              $j("body").append("<p id=’tooltip’>"+ this.t +"</p>");
              $j("#tooltip")
              .css("top",(e.pageY - xOffset) + "px")
              .css("left",(e.pageX + yOffset) + "px")
              .fadeIn("fast");
              },
              function(){
              this.title = this.t;
              $j("#tooltip").remove();
              });
              $j("a.tooltip").mousemove(function(e){
              $j("#tooltip")
              .css("top",(e.pageY - xOffset) + "px")
              .css("left",(e.pageX + yOffset) + "px");
              });
              };



              // starting the script on page load
              $j(function() {
              tooltip();
              });

              // prepend the span tag to the photo gallery
              $(function() {
              $(".gallery a, a.productImages").prepend("<span></span>");
              });

              // send the email
              // let’s start the jQuery while I wait.
              // step 1: onload - capture the submit event on the form.
              $(function() { // onload...do
              $(’#form’).submit(function() {
              // now we’re going to capture *all* the fields in the
              // form and submit it via ajax.

              // :input is a macro that grabs all input types, select boxes
              // textarea, etc. Then I’m using the context of the form from
              // the initial ’#contactForm’ to narrow down our selector
              var inputs = [];
              $(’:input’, this).each(function() {
              inputs.push(this.name + ’=’ + escape(this.value));
              })

              // now if I join our inputs using ’&’ we’ll have a query string
              jQuery.ajax({
              data: inputs.join(’&’),
              url: this.action,
              timeout: 2000,
              error: function() {
              console.log("Failed to submit");
              },
              success: function(r) {
              if (r == 1) {

              $(’form’).slideUp(’slow’);
              $(’p#please’).slideUp(’slow’);
              $("h1").after(’<p id="success" style="display:none;">Your message was sent successfully! We will contact you as soon as possible. </p>’);
              $(’#success’).slideDown(’slow’);
              }
              else {
              alert(r)
              }



              }
              }) // checkout http://jquery.com/api for more syntax and options on this method.

              // re-test...
              // by default - we’ll always return false so it doesn’t redirect the user.
              return false;
              })
              })


              Hopefully this will help. All the scripts may not be in the same file like mine is, so you may have to alter multiple files.

              Just wanted to pass along what I did, plus, I’ll probably need to refer back to this very post so I can remember on future sites. smiley