Not logged in. · Lost password · Register
Forum: General Help and Support Plugins Plugin Wishlist RSS
A more comprehensive lightbox plugin? (like fancybox)
Avatar
tsom #1
Member since Nov 2012 · 46 posts
Group memberships: Members
Show profile · Link to this post
Subject: A more comprehensive lightbox plugin? (like fancybox)
Although we have a few lightbox plugins, they only work in displaying a basic image. In contrast, it would be very nice to have a plugin that allows you to create a 'lightbox' frame for things like iframes or YouTube videos. What I'm referring to is something like fancybox.

How hard would it be to create something like that for Dokuwiki?
Avatar
Michitux #2
Member since Apr 2008 · 377 posts · Location: Karlsruhe, Germany
Group memberships: Members, Wiki Managers
Show profile · Link to this post
It shouldn't be too difficult, basically you need a plugin that

- includes the jQuery plugin in script.js (as explained here)
- includes the CSS file in style.css
- provides syntax for the different features so you don't need to enabled HTML code (it could also allow to put some syntax around a part of the page so it will be displayed in a lightbox).
- enables the lightbox in script.js when the output from these syntax parts is in the page

[Edit] I've just noticed that fancybox is distributed under a Creative Commons Attribution-NonCommercial 3.0 license. As DokuWiki plugins need to be distributed under the GPL 2 which allows commercial use this means that you can't distribute fancybox in a DokuWiki plugin. However you could of course still create this for personal use or look for another lightbox implementation that's distributed under a license that's compatible with the GPL 2.
Did you like my help or work for DokuWiki (plugins)? Consider giving something back.
Avatar
tom_c #3
Member since Jan 2011 · 33 posts · Location: Hackettstown, NJ, US
Group memberships: Members
Show profile · Link to this post
I had something I was using called ColorBox.  I added it at https://www.dokuwiki.org/plugin:colorbox.
Avatar
tsom #4
Member since Nov 2012 · 46 posts
Group memberships: Members
Show profile · Link to this post
Quote by tom_c on 2012-12-23, 16:34:
I had something I was using called ColorBox.  I added it at https://www.dokuwiki.org/plugin:colorbox.

Tom: I had trouble getting this plugin to work. In particular, I couldn't seem to locate linkColorbox.js within the distributed colorbox.zip file from the developer's website. Is this included in the most recent version?
Avatar
tom_c #5
Member since Jan 2011 · 33 posts · Location: Hackettstown, NJ, US
Group memberships: Members
Show profile · Link to this post
Hi tsom,
Sorry that was my mistake.  I created that file by showing the page source on his examples and taking the following code for an iframe implementation.

This is the content of linkColorBox.js
jQuery(document).ready(function(){
    jQuery(".iframe").colorbox({iframe:true, width:"90%", height:"90%"});
});

I usually test the download but rushed on this one. I updated the ColorBox download to contain the missing file. I also update the ColorBox plugin page on dokuwiki to explain that file.  I added a ToDo List that would make this plugin more user friendly by specifying the specific implementation in the command line and remove the file linkColorBox.js.  That file is one example implementation.

Tom
This post was edited on 2012-12-28, 02:22 by tom_c.
Avatar
tsom #6
Member since Nov 2012 · 46 posts
Group memberships: Members
Show profile · Link to this post
Quote by tom_c:
Hi tsom,
Sorry that was my mistake.  I created that file by showing the page source on his examples and taking the following code for an iframe implementation.

This is the content of linkColorBox.js
jQuery(document).ready(function(){
    jQuery(".iframe").colorbox({iframe:true, width:"90%", height:"90%"});
});

I usually test the download but rushed on this one. I updated the ColorBox download to contain the missing file. I also update the ColorBox plugin page on dokuwiki to explain that file.  I added a ToDo List that would make this plugin more user friendly by specifying the specific implementation in the command line and remove the file linkColorBox.js.  That file is one example implementation.

Tom

Thanks Tom. I still couldn't get it to work.

I made sure that /lib/scripts contains the three necessary files and the plugin is updated to the most recent version. However, upon testing the plugin using
<colorbox>&class=iframe&link=http://www.jacklmoore.com/colorbox&name=ColorBox&</colorbox>
{{keywords>colorbox}}

I get the following error displayed on my page:
Warning: Invalid argument supplied for foreach() in /home/mydomain/inc/common.php on line 245

Any idea what that is about?

Edit: This was later resolved with Tom's help. There was a clash with the metaheader plugin producing the error.
This post was edited on 2012-12-30, 16:52 by tsom.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-09-23, 20:07:03 (UTC +02:00)