onlysli
(Luci)
April 3, 2012, 1:11pm
1
Hello.
How can i make a link to open a gallery like in example from fancybox.net/home (Image gallery from bottom), is that possible?
I don’t want to display all the images as thumbnails, just a link which one pressed display the fancybox loaded with some images i choose.
I’ve tried using the same config as the example there but it doesn’t work in yii.
Thank you.
johonunu
(Johonunu)
April 4, 2012, 5:34am
2
Hello.
How can i make a link to open a gallery like in example from fancybox.net/home (Image gallery from bottom), is that possible?
I don’t want to display all the images as thumbnails, just a link which one pressed display the fancybox loaded with some images i choose.
I’ve tried using the same config as the example there but it doesn’t work in yii.
Thank you.
Have you tried fancybox extension ?
http://www.yiiframework.com/extension/fancybox
onlysli
(Luci)
April 4, 2012, 6:39am
3
Yes, that’s the extension i’m talking about, but, i need the gallery to be fired up from a link and not from image thumbnails.
The example from their website works but i can get the extension to do the same thing.
Thank you.
johonunu
(Johonunu)
April 4, 2012, 3:37pm
4
Yes, that’s the extension i’m talking about, but, i need the gallery to be fired up from a link and not from image thumbnails.
The example from their website works but i can get the extension to do the same thing.
Thank you.
Try something like:
<?php echo CHtml::link("Testing Fancybox","#photo", array('class'=>'gallery')); ?>
<div style="display:none">
<div id="photo"><img src="http://dev/auth/thumbs/3002001333483313_0012.JPG" /></div>
</div>
<?php
$this->widget('application.extensions.fancybox.EFancyBox',
array( 'target'=>'a.gallery',
'config'=>array(
'titleShow' => true,
)
)
);
?>
P.S. Don’t forget to change image url.
fortminor
(Kishal255raj)
July 19, 2012, 11:36am
5
I am tying similar thing, and I did as suggested by johonunu , but the images are showing vertically and that too in thumbnails. I need to show bigger images when clicked like gallery style.
I have written my own code for image uploads and cropping, need to integrate gallery.
Also click on More Images, hides the images showing from before and shows them vertically , which is not desired.
<ul class="imglist">
<div id="photos">
<?php
for($row=1; $row>=0 && $row < 5 ; $row--){ ?>
<li><img rel="same" src=<?php echo "images/uploads/thumbs/".$resArr[$row]['file']; ?> border="0" /></li>
<?php } ?>
</div>
</ul>
<div class="al01">
<div class="fl_left al01 tx12_blu"><?php echo CHtml::link("More Photos","#photos", array('class'=>'gallery')); ?> </div>
</div>
<?php
$this->widget('application.extensions.fancybox.EFancyBox',
array( 'target'=>'a.gallery',
'config'=>array(
'titleShow' => true,
'transitionIn'=>'elastic',
'transitionOut'=>'elastic',
'titlePosition'=>'outside'
)
)
);
?>
Please suggest.