Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fancybox (shipped with GS 3.2.3)
#1
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?
Reply


Messages In This Thread
Fancybox (shipped with GS 3.2.3) - by fabianheld - 2013-11-29, 08:34:18
RE: Fancybox (shipped with GS 3.2.3) - by shawn_a - 2013-11-29, 10:09:06
RE: Fancybox (shipped with GS 3.2.3) - by shawn_a - 2013-11-29, 10:14:05
RE: Fancybox (shipped with GS 3.2.3) - by shawn_a - 2013-12-09, 07:27:19



Users browsing this thread: 1 Guest(s)