GetSimple Support Forum

Full Version: Fancybox (shipped with GS 3.2.3)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
I bet the problem is something else, it is registered.
You have to use fancybox-css as the id.
(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.
Yeah no clue too late to change it now