sfJQueryLightboxPlugin - 1.0.1

JQuery image lightbox effect.

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source

sfJQueryLightBoxPlugin

Description

This helper transfomrs image link into fully featured lightbox effect. Automatically creates gallery.

This plugin uses awesome jQuery library and jQueryLightBox plugin by Leandro Vieira Pinho.

Installation

$ symfony plugin:install sfJQueryLightBoxPlugin
$ symfony cache:clear

Usage

Place use_helper in your main layout:

<?php use_helper("Javascript") ?>
<?php use_helper("sfJQueryLightbox") ?>

In template place light_image() function for every image you want to have lightbox effect:

<?php echo light_image($thumbnail_url, $full_image_url, array('title' => $image_title )); ?>

Somewhere at the end of main layout place light_image_activate function:

<?php light_image_activate("Image", "of") ?>

"Image" and "of" is used for gallery text "Image 2 of 3".

Customizations

Function light_image() have following syntax:

light_image($thumb_url, $image_url, $image_link_options = array(), $thumb_options = array() )

Where:

  • $thumb_url : thumbnail url
  • $image_url : full image url
  • $image_link_options : additional html attributes to add to image link (e.g.: array ('title' => 'My image'))
  • $thumb_options : additional html attributes to add to thumb image tag (e.g.: array ('border' => 5))

You can also customize look and feel by modifying css (see css plugin dir) and images used by (see images plugin dir).

Notes

Plugin works best with sfJQueryReloadedPlugin.

Plugin uses jQuery so its not compatible with sfProtoculousPlugin (which has to be disabled).