![]() |
|
sfJQueryLightboxPlugin - 1.1.1JQuery image lightbox effect. |
|
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.
$ symfony plugin:install sfJQueryLightBoxPlugin
$ symfony cache:clear
This plugin requires JqueryReloadedPlugin.
Place jQuery helper in your layout (or settings.yml):
<?php use_helper("jQuery") ?>
And place JQueryLightbox helper somewhere inside your body tag
<?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 )); ?>
Function light_image() have following syntax:
light_image($thumb_url, $image_url, $image_link_options = array(), $thumb_options = array() )
Where:
In your app.yml file you can customize images used for displaying next, prev, close butons and text 'Image X of X':
all:
sf_jquery_lightbox:
css_dir: '/sfJQueryLightboxPlugin/css/'
js_dir: '/sfJQueryLightboxPlugin/js/'
imageLoading: '/sfJQueryLightboxPlugin/images/lightbox-ico-loading.gif'
imageBtnClose: '/sfJQueryLightboxPlugin/images/lightbox-btn-close.gif'
imageBtnPrev: '/sfJQueryLightboxPlugin/images/lightbox-btn-prev.gif'
imageBtnNext: '/sfJQueryLightboxPlugin/images/lightbox-btn-next.gif'
imageBlank: '/sfJQueryLightboxPlugin/images/lightbox-blank.gif'
txtImage: 'Image'
txtOf: 'of'