GetSimple Support Forum
Fancybox-Plugin - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: Fancybox-Plugin (/showthread.php?tid=7439)



Fancybox-Plugin - stwneu - 2015-07-23

I downloaded the fancybox-plugin and with images it is working smoothly. However it does not load a linked page. It shows the error. "The requested content cannot be loaded.Please try again later."

Can I use this plugin to show iframes in a fancybox somehow?


RE: Fancybox-Plugin - datiswous - 2015-07-29

(2015-07-23, 23:10:42)stwneu Wrote: I downloaded the fancybox-plugin and with images it is working smoothly. However it does not load a linked page. It shows the error. "The requested content cannot be loaded.Please try again later."

Can I use this plugin to show iframes in a fancybox somehow?

As far as I know this plugin purely only works with images. 


RE: Fancybox-Plugin - Oleg06 - 2015-07-29

(2015-07-23, 23:10:42)stwneu Wrote: I downloaded the fancybox-plugin and with images it is working smoothly. However it does not load a linked page. It shows the error. "The requested content cannot be loaded.Please try again later."

Can I use this plugin to show iframes in a fancybox somehow?

try to translate the description of this plugin 
http://getsimplecms.ru/plaginy-dlya-getsimple-cms/plagin-fancybox/


RE: Fancybox-Plugin - datiswous - 2015-07-30

(2015-07-29, 16:43:54)Oleg06 Wrote:
(2015-07-23, 23:10:42)stwneu Wrote: I downloaded the fancybox-plugin and with images it is working smoothly. However it does not load a linked page. It shows the error. "The requested content cannot be loaded.Please try again later."

Can I use this plugin to show iframes in a fancybox somehow?

try to translate the description of this plugin 
http://getsimplecms.ru/plaginy-dlya-getsimple-cms/plagin-fancybox/

Is this an alternative version of the plugin uploaded in Extend, or a totally different one?


RE: Fancybox-Plugin - Oleg06 - 2015-07-30

it's the same plugin


RE: Fancybox-Plugin - datiswous - 2015-07-31

The FancyBoxConfig.js file from this plugin has the following code:
Code:
jQuery(document).ready(function() {
   jQuery('a#fb').fancybox({
       'hideOnContentClick': true
   });
   
   jQuery('a[rel]').fancybox();
   
});

Oleg's version adds iframe functionality and has the following code:
Code:
jQuery(document).ready(function() {
   jQuery('a.fb').fancybox({
       'hideOnContentClick': true
   });
   
   jQuery('a[rel]').fancybox();
   
});
jQuery(document).ready(function() {
$("a.iframe").fancybox({
       'autoScale'     : true,
       'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe'
});
});

When you change that to the following code, you will add inline text functionality:
Code:
jQuery(document).ready(function() {
   $('a.fb').fancybox({
       'hideOnContentClick': true
   });
   
   $('a[rel]').fancybox();
   
   $('a.inline').fancybox({
       'hideOnContentClick': true
       });
   
$("a.iframe").fancybox({
       'autoScale'     : true,
       'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe'
});
   
});
Also the code seems somewhat cleaner. Correct me if I made a mistake.

To make inline text work, you need the source view. There you add  id="example" to the <p> element of the text you want to show inline. Optionally, you can hide the text by default so that it will only show by clicking on the link with style="display:none; (this will also hide it in ckeditor though). Change "example" to what you want. Then you make a link with <a class="inline" href="#example"


RE: Fancybox-Plugin - datiswous - 2015-07-31

Btw. the function 'hideOnContentClick': true doesn't actually seam to work. Maybe it uses the in core Fancybox version which has default settings which overrides the plugin settings?

Then following code should be enough:

Code:
jQuery(document).ready(function() {
   $('a.fb').fancybox();
    
   $('a[rel]').fancybox();
    
   $('a.inline').fancybox();
  
$("a.iframe").fancybox({
       'autoScale'     : true,
       'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe'
});
  
});

Or maybe even less (?)


RE: Fancybox-Plugin - Oleg06 - 2015-07-31

thank you for the changes, I made in haste, at the request of one man, so do not attach any significance


RE: Fancybox-Plugin - datiswous - 2015-07-31

No problem. See also my recent made topic:
http://get-simple.info/forums/showthread.php?tid=7459


RE: Fancybox-Plugin - shawn_a - 2015-07-31

I dont know where he got
hideOnContentClick from

I think the docs were wrong at some point on fancyboxs page, and the author ( of fancybox ) changed this config, I remember there being some complaints and no responses from the author at the time, it had terrible support when they suddenly changed the license.

I think it is closeClick now