This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » plugins » Javascript plugins » [sfLightboxPlugin] Official topic [support/bugs/features request]
[sfLightboxPlugin] Official topic [support/bugs/features request] [message #21207] Wed, 07 February 2007 22:46 Go to next message
COil  is currently offline COil
Messages: 466
Registered: September 2006
Faithful Member

Just to say i have released a new javascript plugin :

--> http://www.symfony-project.com/trac/wiki/sfLightboxPlugin

It uses the Lightbox2 (http://www.huddletogether.com/projects/lightbox2/) javascript library to display nice popups for images, slide or arbitrary content (with the Modalbox modification by Demental http://demental.info/blog/index.php?post/2007/01/11/75-intro ducing-modalbox)

Feel free to give me your feedback and to report issues.

See you.

COil Razz

[Updated on: Sat, 14 July 2007 11:10]


my Symfony Blog - http://www.strangebuzz.com
The symfony web debug bar as a standalone library : PEAR::PHP_Debug
Re: [sfLightboxPlugin] New plugin ! [message #21210 is a reply to message #21207 ] Thu, 08 February 2007 00:39 Go to previous messageGo to next message
aruban  is currently offline aruban
Messages: 70
Registered: October 2006
Location: yokohama
Member
i've just saw that on my feed-reader Smile
I will test it today !
thanks !


http://ultrasupernew.com - http://pecha-kucha.org - http://flightclub.klm.com
Re: [sfLightboxPlugin] New plugin ! [message #21300 is a reply to message #21210 ] Fri, 09 February 2007 04:59 Go to previous messageGo to next message
aruban  is currently offline aruban
Messages: 70
Registered: October 2006
Location: yokohama
Member
Ok, so Modal box seams to don't work at all on IE...
It's got some problems with firefox too, on both Mac and windows.
FF problem = loading graphic became invisible, but it rest here, so it's always clickable... when modal box contain form, it's not really cool Very Happy

Coil is Modal box made by you (demental is you ?)


http://ultrasupernew.com - http://pecha-kucha.org - http://flightclub.klm.com
Re: [sfLightboxPlugin] New plugin ! [message #21310 is a reply to message #21207 ] Fri, 09 February 2007 10:31 Go to previous messageGo to next message
COil  is currently offline COil
Messages: 466
Registered: September 2006
Faithful Member

Yes modalbox has several bugs, no it's not me Demental ( http://demental.info/blog/index.php?post/2007/01/11/75-intro ducing-modalbox) i just integrated the helper for modalbox, yes you are right, it does not work well under IE. a patch should be released soon

Thanks for the feedback Smile


my Symfony Blog - http://www.strangebuzz.com
The symfony web debug bar as a standalone library : PEAR::PHP_Debug
Re: [sfLightboxPlugin] New plugin ! [message #21311 is a reply to message #21207 ] Fri, 09 February 2007 11:01 Go to previous messageGo to next message
demental  is currently offline demental
Messages: 34
Registered: April 2006
Location: tarn
Member
Hi.
Would you test this ? http://demental.info/modalbox/example.htm
Seems ok in IE6 and IE7.
Re: [sfLightboxPlugin] New plugin ! [message #21312 is a reply to message #21311 ] Fri, 09 February 2007 11:13 Go to previous messageGo to next message
nautilebleu  is currently offline nautilebleu
Messages: 281
Registered: June 2006
Location: Caen, France
Faithful Member

But not modal in IE7 nor Opera Confused

[Updated on: Fri, 09 February 2007 11:37]


all about me
t-shirts
Re: [sfLightboxPlugin] New plugin ! [message #21313 is a reply to message #21207 ] Fri, 09 February 2007 11:31 Go to previous messageGo to next message
demental  is currently offline demental
Messages: 34
Registered: April 2006
Location: tarn
Member
Ooops.. posted too fast.
Now it's modal.
Re: [sfLightboxPlugin] New plugin ! [message #21314 is a reply to message #21207 ] Fri, 09 February 2007 11:39 Go to previous messageGo to next message
nautilebleu  is currently offline nautilebleu
Messages: 281
Registered: June 2006
Location: Caen, France
Faithful Member

Ok with IE7 but one least strange behaviour with Opera9.10

If I click out of the modal on the black background, nothing happens, but if I click on the grayed links, the modal closes.

<edit>
And a double-clic closes the modal too with opera
</edit>

[Updated on: Fri, 09 February 2007 11:41]


all about me
t-shirts
Re: [sfLightboxPlugin] New plugin ! [message #21315 is a reply to message #21207 ] Fri, 09 February 2007 11:52 Go to previous messageGo to next message
demental  is currently offline demental
Messages: 34
Registered: April 2006
Location: tarn
Member
Thanks nautilebleu.
I'll try to find a workaround for Opera (not sure I will succeed). I see also some glitches on the loading image for the slow open box.

EDIT : Tried to but for now I didn't manage to get rid of this bug (which affects lightbox too). Anyway I'll add the previous fixes to the symfony plugin now.

[Updated on: Fri, 09 February 2007 13:03]

Re: [sfLightboxPlugin] New plugin ! [message #21335 is a reply to message #21207 ] Fri, 09 February 2007 16:41 Go to previous messageGo to next message
COil  is currently offline COil
Messages: 466
Registered: September 2006
Faithful Member

For me it is ok now for modalbox with FF 1.5.0.9 and IE 6.0.2900, i don't have other browsers... Surprised (and too lazy too install another one Laughing )


my Symfony Blog - http://www.strangebuzz.com
The symfony web debug bar as a standalone library : PEAR::PHP_Debug
Re: [sfLightboxPlugin] New plugin ! [message #21358 is a reply to message #21207 ] Sat, 10 February 2007 01:13 Go to previous messageGo to next message
COil  is currently offline COil
Messages: 466
Registered: September 2006
Faithful Member

I made a page with the wiki + a full demo of the 3 snippets... I will kill the first one telling me he can't make the plugin work... Very Happy

--> http://snippets.coilblog.com/plugins/sfLightbox.html


my Symfony Blog - http://www.strangebuzz.com
The symfony web debug bar as a standalone library : PEAR::PHP_Debug
Re: [sfLightboxPlugin] New plugin ! [message #21361 is a reply to message #21358 ] Sat, 10 February 2007 04:05 Go to previous messageGo to next message
aruban  is currently offline aruban
Messages: 70
Registered: October 2006
Location: yokohama
Member
i've just test the wiki page...
can't test on my apps for now, it's the week end Cool
so, it's ok for ie7 so.
Just on modal box, the loading image is still clickable after fadeoff effect. Razz


http://ultrasupernew.com - http://pecha-kucha.org - http://flightclub.klm.com
Re: [sfLightboxPlugin] New plugin ! [message #21378 is a reply to message #21207 ] Sat, 10 February 2007 14:15 Go to previous messageGo to next message
Antik  is currently offline Antik
Messages: 106
Registered: July 2006
Senior Member
Is it possible to change "close icon" throught options?
I need i18n support. Smile
Re: [sfLightboxPlugin] New plugin ! [message #21379 is a reply to message #21378 ] Sat, 10 February 2007 14:28 Go to previous messageGo to next message
COil  is currently offline COil
Messages: 466
Registered: September 2006
Faithful Member

Well, it's actually an image... You can change the images to equivalent ones (without labels), there are in the plugin (close.gif, next.gif, prev.gif) you will have to modify the path in the css ans js. Or to have different images depending on the culture, you will have to generate the css classes with images path and in the js you will also have to make some modification to take images as parameters...

It's a good idea of new feature...


my Symfony Blog - http://www.strangebuzz.com
The symfony web debug bar as a standalone library : PEAR::PHP_Debug
Re: [sfLightboxPlugin] New plugin ! [message #21742 is a reply to message #21207 ] Thu, 15 February 2007 18:53 Go to previous messageGo to next message
jamesou  is currently offline jamesou
Messages: 11
Registered: November 2006
Junior Member
Hi!
Thanks a lot for this great plugin!
I'm using it and i've just noticed a tiny problem :
After an Ajax action/update, the modal box doesn't seem to work.
Is it me or a bug ?

Cheers,

James
Re: [sfLightboxPlugin] New plugin ! [message #21786 is a reply to message #21207 ] Fri, 16 February 2007 10:08 Go to previous messageGo to next message
COil  is currently offline COil
Messages: 466
Registered: September 2006
Faithful Member

A new version should be released next week, we will check the issues


my Symfony Blog - http://www.strangebuzz.com
The symfony web debug bar as a standalone library : PEAR::PHP_Debug
Re: [sfLightboxPlugin] New plugin ! [message #21807 is a reply to message #21786 ] Fri, 16 February 2007 11:44 Go to previous messageGo to next message
jamesou  is currently offline jamesou
Messages: 11
Registered: November 2006
Junior Member
Merci Razz
Re: [sfLightboxPlugin] New plugin ! [message #22496 is a reply to message #21207 ] Mon, 26 February 2007 09:36 Go to previous messageGo to next message
COil  is currently offline COil
Messages: 466
Registered: September 2006
Faithful Member

The new version is released.


my Symfony Blog - http://www.strangebuzz.com
The symfony web debug bar as a standalone library : PEAR::PHP_Debug
Re: [sfLightboxPlugin] New plugin ! [message #22503 is a reply to message #22496 ] Mon, 26 February 2007 12:49 Go to previous messageGo to next message
dawit  is currently offline dawit
Messages: 23
Registered: August 2006
Junior Member
Hi,

I have a form on the lightbox. I am using ajax to submit the form. Is there anyway of hiding / closing the box once the ajax action is complete? There is a method called end() in the js file,

end: function() {
  this.disableKeyboardNav();
  Element.hide('lightbox');
  new Effect.Fade('overlay', { duration: 0.2});
  showSelectBoxes();
}


How can I use this with form_remote_tag complete option?

Thanks,
Re: [sfLightboxPlugin] New plugin ! [message #22505 is a reply to message #22503 ] Mon, 26 February 2007 13:04 Go to previous messageGo to next message
demental  is currently offline demental
Messages: 34
Registered: April 2006
Location: tarn
Member
Hi !
The script creates a modalBox instance with a global scope, called myModalbox. So you just have to call its method 'end()' in your complete callback :

 'complete'=>'myModalbox.end()'


This works in lightbox too, FYI.
Re: [sfLightboxPlugin] New plugin ! [message #22506 is a reply to message #22505 ] Mon, 26 February 2007 13:16 Go to previous messageGo to next message
dawit  is currently offline dawit
Messages: 23
Registered: August 2006
Junior Member
Hi,

I tried lightbox.end() and did not know there is a separate class for modalbox. Anyway it works, thank you for your quick reply!
Re: [sfLightboxPlugin] New plugin ! [message #24446 is a reply to message #22506 ] Mon, 26 March 2007 16:13 Go to previous messageGo to next message
demental  is currently offline demental
Messages: 34
Registered: April 2006
Location: tarn
Member
Hi !
The plugin was just updated. No major enhancements, but at least something cool in the helpers,the options are now parsed so you can write them as scalars. Also some reorganization of the web folder and some preparation for the next release (it will be about culture).
Re: [sfLightboxPlugin] New plugin ! [message #25633 is a reply to message #22506 ] Fri, 13 April 2007 13:26 Go to previous messageGo to next message
dawit  is currently offline dawit
Messages: 23
Registered: August 2006
Junior Member
Hi,

I am using the modalbox on the website I am making. I am activating the modal box from a link but after performing any ajax action on the page, the modal box does not want to work. If I click on the link it just becomes a normal link and displays the box on its own page (javascript / ajax is not executed).

I have a form that saves values to databases through ajax and after complete I refresh the div including the modalbox link (partial). If I click the link again, it looses all its ajax/javascript and becomes a normal link. What might be the causing this?

Thanks!
Re: [sfLightboxPlugin] New plugin ! [message #25759 is a reply to message #21207 ] Mon, 16 April 2007 13:04 Go to previous messageGo to next message
klnikita  is currently offline klnikita
Messages: 8
Registered: April 2007
Junior Member
i have the same problem than dawit, please help us anyone ! Smile
Re: [sfLightboxPlugin] New plugin ! [message #25764 is a reply to message #25759 ] Mon, 16 April 2007 13:28 Go to previous messageGo to next message
demental  is currently offline demental
Messages: 34
Registered: April 2006
Location: tarn
Member
Hi, sorry for the delay...

Do you have a javascript error when link is clicked ?
Is there a web page I can see to find a solution to this issue ?
Re: [sfLightboxPlugin] New plugin ! [message #25771 is a reply to message #25764 ] Mon, 16 April 2007 14:36 Go to previous messageGo to next message
dawit  is currently offline dawit
Messages: 23
Registered: August 2006
Junior Member
Hi,

There is no javascript error at all. That is the confusion. Let me explain the scenario a bit. I have an ajax form which updates a div and the div has the modalbox link. After submitting the form, it updates the div to reflect the changes. Now, if I click on the modalbox link, it looses its ajax and becomes a normal link displaying the modalbox on its own page. There are no javascript errors I can see.

Unfortunately, my website is on localhost so you can not test it to see what the problem is. If you need more info let me know.

Regards,
Dawit

Re: [sfLightboxPlugin] New plugin ! [message #25775 is a reply to message #25771 ] Mon, 16 April 2007 14:56 Go to previous messageGo to next message
demental  is currently offline demental
Messages: 34
Registered: April 2006
Location: tarn
Member
Okay I see,
So this is normal as the modalbox triggers click on links with rel="modalbox" attribute __on page load__

If you want to dynamically add modal links, when your ajax request (and block update) is complete, call the initModalbox() function so that modalbox is inited again, including the newly added link.
Re: [sfLightboxPlugin] New plugin ! [message #25777 is a reply to message #25775 ] Mon, 16 April 2007 15:03 Go to previous messageGo to next message
demental  is currently offline demental
Messages: 34
Registered: April 2006
Location: tarn
Member
Me again.
This should not work in fact, because it will write once more in the DOM the nodes that modalbox need so you will have some duplicate identifiers in the page.
I'll try to publish a fixed version ASAP and notify here.

Anyway the way to make it work will remain the same : call initModalbox() on the onComplete() event of your ajax request or updater.
Re: [sfLightboxPlugin] New plugin ! [message #25779 is a reply to message #25777 ] Mon, 16 April 2007 15:27 Go to previous messageGo to next message
demental  is currently offline demental
Messages: 34
Registered: April 2006
Location: tarn
Member
I've published a v1.0.3 plugin on the wiki. You should now be able to pear upgrade your plugin, which should adress this issue (and a config-related bug btw).
Re: [sfLightboxPlugin] New plugin ! [message #25786 is a reply to message #25777 ] Mon, 16 April 2007 16:19 Go to previous messageGo to next message
dawit  is currently offline dawit
Messages: 23
Registered: August 2006
Junior Member
Hi,

I am not actually creating the link dynamically. The link is in the div to be updated. I only update the div, not the whole page. Here is excerpts of what I have:

generateSuccess.php:

<div id="userinfodiv">
<div class='error'>
<?php if ($sf_request->hasErrors()):
   echo 
__('The data you entered seems to be incorrect. Please    correct the following errors and resubmit');
    endif 
?>

</div>
<?php include_partial('cv/userinfoform', array('user_info' => $user_info'municipialities' => $municipialities
'suburbs' => $suburbs'user_info_m' => $user_info_m'can_accredit_userinfo' => 
$can_accredit_userinfo'user_info_a' => $user_info_a)); ?>

</div>


_useroinfoform:

<?php 
use_helper
('Object''Javascript''I18N''Tabs''Validation''Lightbox');
echo 
form_remote_tag(array(
                 
'url'      => 'cv/updateUserInfo',
                 
'update'   => array('failure' => 'userinfodiv''success' => 'userinfodiv'),
            
'success' => "showCVTab('faminfo')",
            
'script'  => true
          
),
            array(
                
'id' => 'userinfo_form',
                
'class' => 'form'
            
)
        )
?>


<div align="right">
<?php
  $link_options 
= array('title' => 'Verify','class' => 'new blocksize_420x160');
        
  
$serverPage  "/cv/accreditRequest?section=general_info&id={$user_info - >getId()}&update=userinfodiv";
  echo 
light_modallink('<h3>Verify</h3>'$serverPage$link_options);
   
?>

</div>


After the form action is complete I reload the userinfodiv div (not the whole page) on generateSuccess.php which includes the userinfoform partial (the modalbox link is also in this partial as you can see above).

Where do I put the myModalBox.initModalBox()? I tried it with 'success' => "showCVTab('faminfo'), myModalBox.initModalBox()" and does not want to work. Is there anywhere else I should place this?

Thanks,
Dawit
Re: [sfLightboxPlugin] New plugin ! [message #25790 is a reply to message #25786 ] Mon, 16 April 2007 17:05 Go to previous messageGo to next message
demental  is currently offline demental
Messages: 34
Registered: April 2006
Location: tarn
Member
dawit wrote on Mon, 16 April 2007 16:19


Where do I put the myModalBox.initModalBox()? I tried it with 'success' => "showCVTab('faminfo'), myModalBox.initModalBox()" and does not want to work. Is there anywhere else I should place this?

Thanks,
Dawit


This should be 'success'=>"showCVTab('faminfo');initModalbox()"

[Updated on: Mon, 16 April 2007 17:06]

Re: [sfLightboxPlugin] New plugin ! [message #25835 is a reply to message #25790 ] Tue, 17 April 2007 12:13 Go to previous messageGo to next message
dawit  is currently offline dawit
Messages: 23
Registered: August 2006
Junior Member
Hi demental,

I think the initModalbox() function is attached to the body onload event. Since I am updating only the div containing the partial, the method suggested ('success'=>"showCVTab('faminfo');initModalbox()") did not work. I only managed to make it work after calling initModalbox() inside the partial that updates the div. This means on intial page load it initializes the modal box twice, one when the whole page is loading and the other when rendering the partial. I can't figure out if there is a better way of doing this, so I am keeping it this way for now.

Thank you for your help and great plugin!!

Re: [sfLightboxPlugin] New plugin ! [message #25877 is a reply to message #25835 ] Tue, 17 April 2007 18:13 Go to previous messageGo to next message
demental  is currently offline demental
Messages: 34
Registered: April 2006
Location: tarn
Member
Happy to know you found a workaround.

I think it does not work inside the 'success' event because there is some time between the moment the innerHTML of your div is updated and the new DOM elements are accessible via JS. I'm not an expert though so this needs a confirmation.
I guess you could make a pause (pause function is included in the lightbox.js) to let javascript take the time to know about these new DOM elements.
Re: [sfLightboxPlugin] New plugin ! [message #26084 is a reply to message #21207 ] Sun, 22 April 2007 00:08 Go to previous messageGo to next message
infect  is currently offline infect
Messages: 98
Registered: January 2006
Member
Hey guys, thanks for the great plugin.

As of this posting, the lightbox js has been updated to version 2.03.1:

http://www.huddletogether.com/projects/lightbox2/

The latest version adds support for showing and hiding flash objects underneath the lightbox window. It's also quite easy to add this into demental's excellent modalbox js file by adding the "hideFlash()" and "showFlash()" calls in start and end:

...

start: function(imageLink) {	
	hideSelectBoxes();
	hideFlash();

...

end: function() {
	this.disableKeyboardNav();
	Element.hide('lightbox');
	new Effect.Fade('overlay', { duration: overlayDuration});
	showSelectBoxes();
	showFlash();
}

...


... hope that helps anyone dealing with the same issue. I'm sure this will be incorporated into a future release, but it was nice to know it was easy to implement.


Mark Quezada
MirthLab
Re: [sfLightboxPlugin] New plugin ! [message #26197 is a reply to message #21207 ] Tue, 24 April 2007 12:24 Go to previous messageGo to next message
COil  is currently offline COil
Messages: 466
Registered: September 2006
Faithful Member

Damn i've just released a 1.0.4 version with a small bug fix, i guess this will be part of the next release, so this modification should only modify the js file ?


my Symfony Blog - http://www.strangebuzz.com
The symfony web debug bar as a standalone library : PEAR::PHP_Debug
Re: [sfLightboxPlugin] New plugin ! [message #27042 is a reply to message #21207 ] Thu, 10 May 2007 15:48 Go to previous messageGo to next message
cosmicxdust  is currently offline cosmicxdust
Messages: 39
Registered: November 2006
Member
Thank you for a great plugin.

Everything works fine. However, I could not use it with IE 6.0. An unhandled win32 exception occurred and forced me to close IE.

I also try http://www.huddletogether.com/projects/lightbox2/#example, but I had the same error.

It is Lightbox2 or my IE' error? How to solve it?

Thanks in advanced.
Re: [sfLightboxPlugin] New plugin ! [message #27089 is a reply to message #27042 ] Fri, 11 May 2007 15:38 Go to previous messageGo to next message
demental  is currently offline demental
Messages: 34
Registered: April 2006
Location: tarn
Member
Hi
No doubt that your browser is guilty in your case as this should work without any problem on IE6.
Maybe you can upgrade your version to the latest 6.0 (if possible), maybe this could fix it.
Have you tried it on another computer running IE6 ?
or do you have an url to test it ?
Re: [sfLightboxPlugin] New plugin ! [message #27121 is a reply to message #27089 ] Sat, 12 May 2007 06:58 Go to previous messageGo to next message
cosmicxdust  is currently offline cosmicxdust
Messages: 39
Registered: November 2006
Member
demental wrote on Fri, 11 May 2007 15:38

Hi
No doubt that your browser is guilty in your case as this should work without any problem on IE6.
Maybe you can upgrade your version to the latest 6.0 (if possible), maybe this could fix it.
Have you tried it on another computer running IE6 ?
or do you have an url to test it ?


Thank you, demental!

I may find the solution. In Tools->Internet Options->Advanced, I unchecked option "Enable third-party browser extensions". It means I disabled Broswer Helper Object.

I have tested it at http://www.huddletogether.com/projects/lightbox2/#example, and it works.

I do not know how it is. If a user does not disable this option, he or she could not use Lightbox.

I have one more question. How could we format the layout when display images. If I put all picture array in light_slideshow, I will get pictures the display continuously.

Thank you.
Re: [sfLightboxPlugin] New plugin ! [message #27512 is a reply to message #27121 ] Thu, 17 May 2007 18:43 Go to previous messageGo to next message
cosmicxdust  is currently offline cosmicxdust
Messages: 39
Registered: November 2006
Member
Any help!
Re: [sfLightboxPlugin] New plugin ! [message #30590 is a reply to message #21207 ] Mon, 02 July 2007 10:49 Go to previous messageGo to previous message
COil  is currently offline COil
Messages: 466
Registered: September 2006
Faithful Member

You cna do it by applying a style on a div that would contain the images ?


my Symfony Blog - http://www.strangebuzz.com
The symfony web debug bar as a standalone library : PEAR::PHP_Debug
Previous Topic:sfJqueryReloadedPlugin => No Local jquery.js, Instead Google Hosted Jquery file
Next Topic:Problem with "visual_effect"
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software