GetSimple Support Forum
Fancybox (shipped with GS 3.2.3) - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: Fancybox (shipped with GS 3.2.3) (/showthread.php?tid=5407)



Fancybox (shipped with GS 3.2.3) - fabianheld - 2013-11-29

There is a wiki page for loading scripts/stylesheet for plugins: http://get-simple.info/wiki/plugins:creation

One question: The wiki says that GS provides some scripts that are pre registered and just have to be loaded in my plugin. I want to use Fancybox, therefore I added it to my plugin:

Quote:queue_script('jquery',GSFRONT);
queue_script('fancybox',GSFRONT);

Generally it is working, but the stylesheet for Fancybox is missing. I tried to add it this way, but that did not work:

Quote:queue_script('jquery',GSFRONT);
queue_script('fancybox',GSFRONT);
queue_style('fancybox',GSFRONT);

The fancybox stylesheet seems not to be preregistered. Therefore I looked for it in the admin interface. Finally this way it works fine:

Quote:queue_script('jquery',GSFRONT);
queue_script('fancybox',GSFRONT);
register_style('fancybox', '.../admin/template/js/fancybox/jquery.fancybox.css?v=2.0.4', GSVERSION, 'screen');
queue_style('fancybox',GSFRONT);

I think there should be an easier way to use the fancybox script/stylesheet. Furthermore I think that it is a bug that the fancybox stylesheet is not preregistered.

Is it a bug?


RE: Fancybox (shipped with GS 3.2.3) - shawn_a - 2013-11-29

I bet the problem is something else, it is registered.


RE: Fancybox (shipped with GS 3.2.3) - shawn_a - 2013-11-29

You have to use fancybox-css as the id.


RE: Fancybox (shipped with GS 3.2.3) - fabianheld - 2013-12-09

(2013-11-29, 10:14:05)shawn_a Wrote: You have to use fancybox-css as the id.

Thanks for your help. With the name fancybox-css it is working now.

Anyway the naming seems not to be consistent. For getsimple names for the script and the stylesheet are the same (getsimple). But for fancybox the names are not.


RE: Fancybox (shipped with GS 3.2.3) - shawn_a - 2013-12-09

Yeah no clue too late to change it now