form and substance of communication

light[email protected]/167089545/
April 16th, 2010

wordpress multibox plugin

There are many modal window plugins, commonly known as “lightbox”, available online: multiBox coded by phatfusion is powerful and relatively lightweight, it is probably the best option within the MooTools framework.

Starting from that script, Manfred Rutschmann, has released the WordPress Multibox Plugin, to make the installation process into a WordPress blog easy and straightforward.

Unfortunately, this plugin could conflict with other extensions, since it injects <script> tags into the page without checking if the code has already been loaded, as the WordPress documentation crearly recommends.

So, I’ve modified the file multibox.php in order to run wp_register_script and wp_enqueue_script function for javascript loading without hassle:

	function makeHeaderscripts($moo) 
	if($moo == 1) 
		wp_register_script('moocore', WP_PLUGIN_URL . '/wordpress-multibox-plugin/mtv120/mootools-1.2-core-yc.js', false, '1.2');
		wp_register_script('moomore', WP_PLUGIN_URL . '/wordpress-multibox-plugin/mtv120/mootools-1.2-more.js', false, '1.2');
		wp_enqueue_script('overlay', WP_PLUGIN_URL . '/wordpress-multibox-plugin/mtv120/overlay-1.2.js', array('moocore','moomore'), '1.2');
		wp_enqueue_script('multibox', WP_PLUGIN_URL . '/wordpress-multibox-plugin/mtv120/multibox-1.3.1.js', array('moocore','moomore'), '1.2');
  	{	wp_register_script('mootools', WP_PLUGIN_URL . '/wordpress-multibox-plugin/mtv111/mootools.js', false, '1.1');
		wp_enqueue_script('overlay', WP_PLUGIN_URL . '/wordpress-multibox-plugin/mtv111/overlay.js', array('mootools'), '1.1');
		wp_enqueue_script('multibox', WP_PLUGIN_URL . '/wordpress-multibox-plugin/mtv111/multibox.js', array('mootools'), '1.1');

Moreover, some improvements to the Multibox class make it able to handle inline elements and Ajax requests like the script version patched by Liam Smart. The plugin installation package is:
Update: now supporting MooTools version 1.3 and WordPress native AJAX functions!!
in the WordPress plugin directory: WP Multibox


  1. Thanks for the new script. However, I can’t get it to function for me. It seems that no matter what when I click on a link to an image (or I guess anything), it just displays said image in a blank window. Not what I want. Turned off Lightbox and NextGen, no change.

    The page I’m talking about is here:

    And the image link is in the upper left underneath the ‘next>’ link. Any help would be greatly appreciated. Thanks.

    • 3dolab 17 Sep 2010

      Sorry, I couldn’t find any image link, and I’ve tried to look into the source but the plugin seems to be deactivated.
      However, I guess that’s only a compatibility issue with other plugins such as the gallery.
      Make sure that the class set in the multibox administration panel matches the link class printed out in the gallery.

      Please send a link to a test page!

  2. Hi,

    I’m trying to use your plugin… but I can’t any documentation to use it. Can you help me ?

  3. Nice plugin. I have made a blog entry for the plugin here –

  4. Richard Watson 2 Mar 2011 Reply

    Hi There

    I installed the plug in but I have no idea how to actually use it.

    What code do I need to put into the document? Does it need to go into the WordPress theme or into the wordpress wysiwyg content screen?



  5. 3dolab 2 Mar 2011 Reply

    Hello, after activating the plugin you only need to go to the settings panel and make sure that “automatic mode” is checked.
    Otherwise, you have to set a custom class for your links, according to the name specified in the 4th row of the settings page (the default is “wmp”), either in the theme files or in the content editor depending on where you want it to run.

    In addition, if you’re using an image gallery plugin such as Nextgen or Cleaner Gallery, remember to make it use the same class name and disable other built-in lightbox scripts.

    Please refer to the plugin page on the WordPress repository for further documentation, I am going to improve it into deeper detail.

  6. has anyone gotten this to work inside of wp_nav_menus ?

    • 3dolab 7 Mar 2011

      I’ve never used it, but I guess you have to set the custom class within the a tag
      this guide should help you

  7. Do you have a solution for the extension mp4

  8. robcreative 21 Mar 2011 Reply

    I am trying to use multibox to display multi-page PDFs in my wordpress site instead of requiring users to download them. I’m able to get it to work using Safari, but not Firefox. In firefox, I get the lightbox window that opens but only a text link to download the PDF. What am I doing wrong?


  9. I have the plugin installed and activated, but I’m not having any luck. Here’s how I set up the link to the .swf file that I would like to have open in a lightbox on the same page:

    Instead of getting the lightbox effect, however, the .swf is loading in its own browser window. Any insight you can offer would be appreciated.

  10. Here’s the HTML string I tried to include in my previous comment:

    <a href=”http://localhost/ls/wp-content/themes/laurelsprings/images/TestDemo1.swf”><img src=”” alt=”Laurel Springs Course Demos” style=”float:right;margin:4px 0px 7px 7px;” /></a>

  11. Oops. That was the wrong one. I apologize for cluttering things up.

    <a href=”http://localhost/ls/wp-content/themes/foo/images/TestDemo1.swf”><img src=”” /></a>

  12. Michael 17 Apr 2011 Reply

    Thank you for the WP Multibox. I use it in the manual mode because the additional HTML-code is unacceptable for my CSS-rules. But the problem I have is an other one: After displaying a pdf-file (for instance) in the Multibox and when the box is closed and disappeared it is impossible to scroll the current page by the mouse again. Any solutions? Thanx!

  13. 3dolab 5 May 2011 Reply

    I’m sorry but I have no suggestions at the moment, and I have to point out that this plugin only makes Multibox available for WordPress. If you need support with MooTools Multibox Javascript on particular issues, for instance with PDF/MP4/SWF files, you should better ask to the author:

  14. Works very nicely getting a lightbox iframe. However, I was curious if there’s a way to automatically size the box according to the size of the browser window? (like, width and height percentage rather than pixels). Also, can automatic mode work for a domain rather than extension?


  15. Hi,

    I’m using this to load wordpress pages in a lightbox, very nice!It would be even better if I could set the lightbox width and height to say 75% of the browser window – rather than pixels as Steven mentioned above 🙂

  16. I added a multibox to my wordpress site and set it to open another page within the site. Everything looks good except for one problem. I have a link in that page and right now when you click it it visits that link within the lightbox. I would like the lightbox to close and the link to be opened on the main window when clicked. Can anyone help me with this?

  17. I like the plugin and would like to expand its use to include Log-in and Register modals. If I have a custom register page, for example, is there a way to call only the WP page (without all the other stuff, like the nav bars, footer, sidebars, etc.)?

    • 3dolab 19 Jul 2011

      Sure you can! Enable the WordPress AJAX feature in the plugin settings. Set the attribute rel="wpajax:true" in the trigger link. Set the ID of the link to: ‘yourclass’+’-ajax-‘+’targetpost->ID’ e.g. “wmp-ajax-42”, or “lightbox-ajax-536” Multibox will connect to the WordPress native AJAX gateway (admin-ajax.php) and display the post content. Just like I did with the contact form link in the footer. Unfortunately, at the moment you have to know the post ID: automatic retrieval of the post content, from a given slug/URL, will be implemented in a future release.

  18. Apresador 18 Sep 2011 Reply


    have the following problems with the multibox: no response to my settings, either directly in the code, even in the Multibox settings. Would like a white frame with e.g. 10px, so stored in the settings, no response.


    Code on this site: link to Google (HTML in Multibox)

    But if you press the link that is only a small iFrame, 400 x 300px at.

    And what should I do to link an image instead of a text?

    Thanks in advance


  19. Hi there.
    Great website. I’ve tried about a dozen slideshows and cannot get any of them to work seamlessly with wordpress in all three major browsers.

    Am hoping yours is the one.
    Thanks for the simple to understand directions. Even if this doesn’t work, kudos to you for that.

    have a great day!

  20. Skymone 20 Mar 2012 Reply

    I’ve tried to use this plugin to display posts that are linked from an image, but I can’t seem to get it working – I thought I was using the right code and settings. Here’s the page where I’m trying to use it:
    I’ve tried setting it to Mootools v1.3 and v1.25, no luck with any. I didn’t change the class from wmp, and I uninstalled all lightbox-like addons I had before.
    Hope you can see what I’m doing wrong, and otherwise thanks for making this plugin public!

    • 3dolab 23 Mar 2012

      I’ve followed the link you provided, but I can see only the jQuery Colorbox… am I too late?

      BTW, have you already tried to use the native AJAX post retrieval?

      If still interested, please send me a link to a pre-production test site?

  21. Hi,

    I’m wanting to do something pretty simple I think but no luck so far. I want the multibox lightbox to display a couple of specific pictures that I will designate, but with the current settings, it is pulling all pictures. I only want it to display certain ones.

    Below is the list item that contains the trigger link. Based on the FAQ’s at the WP Plugin download page, I thought the way to accomplish this was to simply create a page that contains the 2 images I want to display in the lightbox and call the page using its ID. If you understand what I’m trying to accomplish, would you mind making a suggestion as to what I should do differently?


    Thanks for any help you can give!

  22. Hmm, your comment feature seems to have stripped out the block of code I included above. Oh well, if you could just give me some direction on how to use multibox to display specific designated images in a gallery basically, I would really appreciate it.

    Thanks again!

  23. Hi,

    I included the WP Multibox Plugin on my website, but it seems that there is a bug?

    I need the Lightbox to include videos (wmv) on my website. When I click on the image the lightbox loads, so far no problem. But then no video appears.
    It only works when i go to another tab in the browser and go back. Then the video opens.

    Could someone please help me and have a look on this issue?

    Thanks very much!

  24. Pål Heick 21 May 2012 Reply

    Hi, I would really like to use the caption instead of the alternate text in the lightbox – is there anywhere I can change that?

    Thanks for a great plugin 🙂

Leave a Reply

  • development diary