I can't seem to get the rate widget to work correctly inside lightbox2 frame.
Using views and a lightbox trigger the rate widget works fine when you vote. It records the vote.
But then closes the lightbox window automatically.
My desired function would be for the widget to record the vote update the widget and keep the lightbox window up.
Could this be a lightbox issue ? Or something in the response from the ajax call ? Or a view issue ? I have come at it several ways with little success. Do any javascript gurus have a suggestion ?

Comments

rcaracaus’s picture

works for me using colorbox.. try colorbox.

BJ___’s picture

Thanks rcaracaus.

I realized that the reason for this problem is because the default lightbox mode when using a lightbox trigger in views is [lightmodal] it doesn't like the ajax post and closes the lightbox after being clicked.

I needed to get it to use [lightframe] not the easiest task in the world.

I solved the problem with some fairly ugly hacking by firstly editing the lightbox module

Described here http://drupal.org/node/483798#comment-4305132 by @dosborn @tiato
I could then create a custom lightbox trigger in my view and use the iframe setting.

Also This post describes how to deal with lighbox iframe template issues

http://drupal.org/node/252260

Might have been easier to just us colorbox :)

This is not a Rate module issue so it should probably be closed

simons’s picture

Could you please explain how to use it with colorbox... thanks

BJ___’s picture

Hi Simons,

It's been a while since I have done this so I can give you a brief overview. If you get stuck let me know and I'll get back to you.
The basic idea is that you will download both the color box and rate module. You will also need the views module.
You will then create a view adding the rate field into you view. When you choose a display, you will pick colorbox for your display.
If this sounds too basic I can try and get a bit more technical, but again it was a while since I did this. I also used lightbox instead.
I think that colorbox is the more popular choice these days.

simons’s picture

Thanks BJ for your reply. Yes I prefer colorbox because it's faster.

Anyway, I installed lightbox and followed your instructions but unfortunately i still can't get it to work. I can only view the vote results (from the rate module) in lightbox but not sure how to display the rate widget so users can rate an image in lightbox.

BJ___’s picture

Issue tags: +Does colorbox work for you ?

Truthfully it's been a long time since I did this with lightbox. I would have to try it again to give you anymore help. Does it work for you in Colorbox though ?
Colorbox is a much more popular choice these days. If it works for you using colorbox I would simply just use that. If not. If I get some time I can try looking at how I did it with lightbox.

simons’s picture

No I can't get it to work in colorbox as well.... Whenever you get a chance I would appreciate some guidelines.... thanks

lamp5’s picture

Issue summary: View changes
Status: Active » Closed (outdated)