The Elearning Community • How to use fancy box
Page 1 of 1

How to use fancy box

Posted: Thu Sep 13, 2018 5:55 pm
by gihel
Hi everibody
I just want to open a windows to present page web
Thank you

Re: How to use fancy box

Posted: Fri Sep 14, 2018 10:08 am
by alfa24
Can you explain? Where exactly in the platform would you need it?

Re: How to use fancy box

Posted: Sat Sep 15, 2018 4:18 pm
by gihel
when I write html code in a course, I would like create a buton to open a window with my own page html in a box
thank you

Re: How to use fancy box

Posted: Sat Sep 15, 2018 8:23 pm
by alfa24
In a course? What do you mean? In a learning object? Web page type?

Re: How to use fancy box

Posted: Sun Sep 16, 2018 5:21 pm
by gihel
Yes Learning object, HTML and inside htlm clic on button open fancybox or other box

Re: How to use fancy box

Posted: Sun Sep 16, 2018 8:11 pm
by alfa24
Never tried, but you could try with some javascript and use the lightbox of Forma.
I can do some test for you in the next days. What version of Forma are you using?

Re: How to use fancy box

Posted: Mon Sep 17, 2018 7:54 am
by alfa24
It seems you can't.
Lightbox is not initiated in the Web Page Learning Object type and you can't add script tag as it would be stripped by tinymce editor for security reasons.
You could try to modify function play in /appLms/class.module/learning.htmlpage.php file adding

Code: Select all

$GLOBALS['page']->add('<script type="text/javascript">var lb = new LightBox();
        var Config = {};
        Config.langs = {_CLOSE: "Chiudi"};
        lb.init(Config);</script>', 'content');
before the code:

Code: Select all

$GLOBALS['page']->add('<div id="top" class="std_block">'
			.getBackUi( str_replace( '&', '&amp;', $this->back_url ), Lang::t('_BACK'))
			.'<div class="title">'.$title.'</div>'
			.'<div class="textof">'.$textof, 'content');
And try with a <a rel="lightbox" href="/your_destination"> link.

Re: How to use fancy box

Posted: Wed Sep 19, 2018 3:54 pm
by gihel
Thank you very much Alfa or Jasmine.
I try it and come back to say : ' It is wonderful!!! '

thank you so much

This site uses cookies.

Some of the cookies we use are essential for parts of the site to operate and have already been set. We also use Google Analytics scripts, which all use cookies.
You may delete or block all cookies from this site in your browser options.