Install ¶
For install lyiightbox you have only to copy his files in /protected/extensions/lyiightbox folder.
Simple Usage ¶
To use this widget with one image:
<?php
$this->widget('ext.lyiightbox.LyiightBox2', array(
'smallest' => '/path/to/thumb/images.jpg',
'biggest' => '/path/to/biggest/image.jpg',
'title' => 'Sample Image 1.'
));
?>
Hide Images ¶
If you want, you can also hide some image with "visible" option. By default visible is set to true.
<?php
$this->widget('ext.lyiightbox.LyiightBox2', array(
'smallest' => '/path/to/thumb/images.jpg',
'biggest' => '/path/to/biggest/image.jpg',
'title' => 'Sample Image 1.'
));
$this->widget('ext.lyiightbox.LyiightBox2', array(
'smallest' => '/path/to/thumb/images.jpg',
'biggest' => '/path/to/biggest/image.jpg',
'title' => 'Sample Image 1.',
'visible' => false
));
?>
Grouping Images ¶
If you put more images in the same group, you can just show the first one and hide the others. The others must have the same group name. By default, all images stay in "_" group. If you want, you can specify it:
<?php
$this->widget('ext.lyiightbox.LyiightBox2', array(
'smallest' => '/path/to/thumb/images.jpg',
'biggest' => '/path/to/biggest/image.jpg',
'title' => 'Sample Image 1.',
'group' => 'sample'
));
$this->widget('ext.lyiightbox.LyiightBox2', array(
'smallest' => '/path/to/thumb/images.jpg',
'biggest' => '/path/to/biggest/image.jpg',
'title' => 'Sample Image 1.',
'visible' => false,
'group' => 'sample'
));
?>
Change Log ¶
v1.1.1RC (January 2nd, 2011) ¶
- some bug fix
- changed licence
v1.0 (September 27th, 2011) ¶
- created extension
new version
As there is a new version of the extension, would be nice if you include a changelog.
next version 1.1
In next version (you can see it in github) there will be a new class and new features: Galleryii. I think this will be done within 30 of this month.
PS. ChangeLog is the first title :-p
I got this error
I copy lyiightbox to extensions folder and use this code to display widget:
<?php $this->widget('ext.lyiightbox.LyiightBox2',array( 'thumbnail'=>getImage($product->image,'images/content/',200,200), 'image'=>'images/content/'.$product->image, 'title'=>$product->name, ));?>
But widget don't show on my website, it throws this error:
Uncaught ReferenceError: lyiightboxAssetUrl is not defined
Fixed issue #15
Thank you for your contribute DavidTran:
I've just added rc1.1.1
Fix is visible here: github.com/sensorario/lyiightbox
thumbnail size?
If I am displaying images from my db can I somehow set the thumbnail size?
<?php $this->widget('ext.lyiightbox.LyiightBox2',array( 'thumbnail'=>$this->createUrl( 'displaySavedImage',array('id'=>$model->primaryKey)), 'image'=>$this->createUrl( 'displaySavedImage',array('id'=>$model->primaryKey)), ));?>
Also is there a way to use Galleryii to render images in the db?
Thanks for the extension.
thumbSide
To set dimensions of thumbnails you have to set thumbSide parameter.
thumbnail size :: thumbSide
sensorario, since thumbSide is part of Galleryii I don't see that as a solution to my question. I have not been able to get Galleryii to work with a database. No problems with using it as you have it built but would really like to take advantage of this extension with db files if possible. Thanks
The issue?
The issue is "render images stored in a database"?
Please Fix CSS
the real path of prev and next button is
url(../lyiightbox2images/nextlabel.gif)
url(../lyiightbox2images/prevlabel.gif)
Lyiightbox is now up to date
I've fixed the path bug. Thank you!
Demo
Hi sensorario, please include a demo of the gallery. Thanks.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.