lightbox

NP_LightBox.php

NP_LightBox is a simple plugin to add LightBox functionality to Nucleus blogs. NP_LightBox will automatically create a thumbnail of the image, and when clicked, will show the full size image in LightBox style.

General Plugin info
Author: Seventoes
Current Version: 1.0
Download: Here .zip ~10kb
Demo: Here
Forum Thread: Here

Installing

  1. Unzip the file and upload the contents to your plugin directory
  2. Install the plugin...
  3. Add <%LightBox()%> to your skins, which will include all of the needed css/js files. If you want to keep your pages (X)HTML complient, keep that tag in your pages <head> section.
  4. Remember to edit the plugin’s options to your needs, since NP_LightBox will not work without the imagePath option set.

How to use the plugin

Using NP_LightBox is very easy. To make an automatic thumbnail, and add lightbox functionality to an image, just follow this format while writing your post:

!~~ImageUrl[|Caption]~~!

Here are some examples:

!~~myNewBaby.jpg|Isnt it cute?~~!

That will make a thumbnail of the picture myNewBaby.jpg, which should be found in the directory specified in the plugin options, and add lightbox functionality to it.

!~~http://forum.nucleuscms.org/templates/nucleus/images/nucleusforum.gif~~! External links work as of version 0.9. Also notice that this one does not have a caption. This will make NP_LightBox show either the name of the image, or whatever text is specified in the plugin options.

The nucleus <%popup()%> behavoir can also be replaced with NP_LightBox. Heres an example: <%Popup(img.jpg|200|100|Caption)%> Width and height are ignored, so you dont need them.

Normal HTML Links may be replaced if you want too.

<a href=”img.png”><img src=”img.png”></a>

The links location must be the same as the image’s source.

Available SkinVars/TemplateVars

<%LightBox()%> - Used to add required files to pages.

Options

The first option is the directory which your images will be held in. This option MUST be set correctly, or NP_LightBox WILL NOT work.

The second option is the text which should be displayed if no caption is provided. This option can be set to LB_imageName to show the image’s filename.

The third option is weather or not to display thumbnails

The fourth option is the max size that thumbnails can be.

The fifth option is weather or not to replace nucleus <%popup%> behavoir with NP_LightBox behavoir.

The sixth option is weather or not to replace normal HTML image links with NP_LightBox behavoir.

Wishlist

  • Support for thumbnailing .gif

Bugs

  • Cannot thumbnail .gif (gd problem, .gif is copywrited... :( )
  • If the caption is too long, it just runs off the lightbox...

History

  • Version 1.0, Popup behavoir and HTML image link support 3/29/06
  • Version 0.9, a few bug fixes 3/24/06
  • Version 0.8, released 3/24/06
 
lightbox.txt · Last modified: 2006/07/05 13:03