FancyBox is a tool for displaying images, html content and multi-media in a Mac-style "lightbox" that floats overtop of web page
Version 1.6 avaliable for download. ¶
Yii version of fancybox extension.
Resources ¶
Documentation ¶
Requirements ¶
Installation ¶
- Extract the release file under
protected/extensions
- Put the below code into your views
Usage ¶
See the following code example:
$this->widget('application.extensions.fancybox.EFancyBox', array(
'target'=>'a[rel=gallery]',
'config'=>array(),
)
);
Try others combinations. See configuration parameters bellow. ¶
Parameters you could set on EFancyBox ¶
id = @string, the id of the widget.
target = @string, the target objects, user jquery notation.
easingEnabled = @boolean, whether to enable mouse interations. Defauts set to true.
mouseEnabled = @boolean, whether to insert jquery easing plugin to expand transitions effects. Check http://gsgd.co.uk/sandbox/jquery/easing/. Defaults set to false.
config = @array, configuration parameters of fancy box plugin. Defaults set to basic fancy box configuration.
Goto Fancy Box website to check fancy box jquery plugin configuration parameters. ¶
Change Log ¶
July 16, 2010 ¶
August 5, 2010 ¶
- CFancyBox changed to EFancyBox to prevent incompatibility with Yii core classes.
- Class core code rewrited.
- Added JQuery Easing Plugin.
February 16, 2011 ¶
- Fancybox assets updated to last version 1.3.4
- Implemented solution for multiple instances of fancybox on page.
- Code commented.
March 16, 2011 ¶
*Fixed bug, $this->add to $this->id.
*Fixed link on extension description.
Total 20 comments
Hi, love the FancyBox extension. Works beautifully. I just have one question:
Is it possible to invoke the extension using a button (either CHtml::button or CHtml::ajaxButton) instead of using a link? I have tried the following:
The CHtml::link works, but the CHtml::ajaxButton does not, and just displays:
The requested content cannot be loaded. Please try again later.
Please help.
Thank you first
I added it in grid view to image column and it was worked in perfect way in first page results , but when i go to next page fanceybox not worked ?! How to fix it ?
Hello,
Images are not found in IE. Please find thoses lines and edit the src path, by removing "fancybox/"
Here is the fix :
Line 327-335
Line 346
and line 352-359 :
Cheers,
Yann
Nice plugin, thanks!
For a simple fancybox example to get up to speed see below:
Fancybox2 would require a separate extension because the license has changed (Creative Commons Attribution-NonCommercial 3.0).
Thanks for the extension, it has the minimum options required and luckily no more, very straight-forward. I would like to see proper PHPDoc use for the properties and functions though ;)
Hi,
I have use fancy box new release but it not work any box not load on screen.
my code....
<?php echo CHtml::link("tes","#data", array('id'=>'inline')); ?>but not work. give reply
Thanks in advance
This might be a problem in fancybox sources itself, but in my laptop scrolling both up and down with my mouse loads the next image (so, I cannot go to the previous image). This is kind of bugging me. Can you please check?
Is this based on FancyBox 1 or 2? Do you consider to build a separate one for FancyBox version 2?
Just fixed the bugs!
just download this extension and saw
i have few links on page to load custom galley. to load each galleries i use ajax with renderPartial method. if i click first link - first gallery loaded work ok, but second and all other galleries laded but does not work - js error occur like this 'u is undefinited'. Need solution///
For some the 'X' (Close button) image wont show on IE, in order to solve that Issue please see the following article: http://www.seemly.co.uk/blog/fancybox-close-button-not-showing-in-internet-explorer
How to use fancybox for example if I have an image under /images/img01.jpg . thank you very much
Hi everyone! Can anyone give me example how to use fancybox with thumbnails. For example I have an image under /images/image1.jpg and I want it to be displayed as thumbnail after I click it'd use fancybox. Thank you for your help
[you could delete those comments after read them xD] the "fancybox" link that asks ppl to go to their site to see config params is broken... its .net, not .com.
Nice extension! :D But one tip: update the block of code from the documentation above. It still shows "CFancyBox".
Yes, Gary's right! Unique Id'd be pretty useful. Here's a simple patch for v1.5:
great extension! Only one suggestion to add some parameter like unique Id to options because for multiple usage on site
thank you @thiagovidal, i love this widget.
i just only put this on my page view. <?php echo CHtml::link("tes","#data", array('id'=>'inline')); ?> <div style="display:none"> <div id="data"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </div> </div> <?php $this->widget('application.extensions.fancybox.CFancyBox', array( 'target'=>'a#inline', 'config'=>array( 'scrolling' => 'yes', 'titleShow' => true, ), ) ); ?>
Leave a comment
Please login to leave your comment.