rel attribute lightframe disappears if I fill in a width
Apfel007 - June 6, 2009 - 16:02
| Project: | Lightbox2 |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Hi there,
did you know that problem, if like to use a width the rel attribute breaks..
like this ->
<a rel="600px]" href="http://xxxxx">Search google</a>
this works ->
<a href="http://www.google.com" rel="lightframe[][my caption]">Search google</a>
this works ->
<a href="http://www.google.com" rel="lightframe[search]">Search google</a>
but this not ->
<a href="http://www.google.com" rel="lightframe[|width:400px; height:300px; scrolling: auto;]">Search google</a>Could someone can give me a hint?
Cheers

#1
I can't reproduce that problem using the latest dev release. Can you provide a link to your site where I can see it happening? My contact form is enabled if you wish to do so privately (just quote the ticket number).
Cheers,
Stella
#2
Do you have the input filter "Disable Lightbox iframe filter" enabled for the input format you're using? You can check at admin/settings/filters. If so, you should disable it.
#3
It's disabled..
#4
actually it's one of the other filters that interferes - I think it's "HTML corrector", or possibly "HTML filter" (though I wouldn't recommend disabling this one for untrusted users). It's also possible removing the spaces from the rel attribute might fix the problem.
#5
Hi,
I setup a own lightbox filter now - and that works :-) for a note but..
if I use the lightframe in a view - "Rewrite the output of this field" - it doesn't work .. I disabled all filters only the lightbox-filters are active...
#6
#7
sorry to fast ...
#8
is there not a way to escape tokens... seems like that is the problem
#9
I'm also having this problem. Has any maintainer looked into this and what might be causing it? I am trying to use the rewrite in views to make a emfield video lightbox'ed with a specific width and height (or else it plays in the lightbox with scroll bars). Perhaps there's another way to do it.
To be specific, I tried disabling all the default site filters and enabling all lightbox filters except for the Disable Lightbox iframe filter.
In my view, I have a video emfield- Content: Video (field_video_upload)
I am rewriting output of this field as:
<a href="[field_video_upload_fid]" rel="lightvideo[|width:400px;height:300px;][caption]">%1</a>in the rendered HTML for the view, it comes up deformed, as:
<span class="field-content"><a href="http://localhost/sites/default/files/video/Wildlife.wmv" rel="300px;][caption]">Media node</a></span>when I leave out the width/height as:
<a href="[field_video_upload_fid]" rel="lightvideo[][caption]">%1</a>it renders correctly the video with "caption" in the lightbox.
So, ..... ? What's this all about? @taits asks a good question: can you escape the [] brackets, because maybe views is trying to interpret this as a token? I tried \[|width...\] but that didn't take any differently.
Advice? Is this not workable because of the square brackets? Is your the patch you guys are passing around in #474454: Views lightbox2 custom field handler going to work better for me in this case to display video?
-- glen
#10
The problem is a conflict with one of the input filters. I can't remember which one exactly, it may be the "html corrector".
#11
@Stella, yes I saw that in an earlier post. However, I tried disabling ALL the filters for "Full HTML" and it didn't make a change. I am also using Better Formats to manage filters. Am I missing something? Is there a view-specific filters definition?
#12
I would recommend that the code check that the offending filter is not enabled when the module is installed.
--glen
#13
when trying to add a lightbox trigger i get the following error. any help would be appreciated. i have the following config:
FileField 6.x-3.2
Image 6.x-1.0-alpha5
ImageAPI 6.x-1.6
ImageCache 6.x-2.0-beta10
Lightbox2 6.x-1.x-dev (2009-Oct-02)
im also experiencing rewrite issues like above when i add width and height to output field. i have "Disable Lightbox iframe filter" enabled
#14
to add to my previous post here is the code im using (image thumb to open vimeo emed video).
<a class="emvideo-thumbnail-replacement emvideo-modal-lightbox2 lightbox2 lightbox-processed emvideo-thumbnail-replacement-processed" rel="lightframe[flash_video|width:416; height:283;]" title="Cinemash: Training Day " href="/littlebleufilms/emvideo/modal/93/400/267/field_embedded_video/vimeo/7207609"><span/><img width="200" height="135" title="Thumbnail Not Available" alt="Thumbnail Not Available" src="http://3rwebdesign.com/littlebleufilms/sites/default/files/emvideo-vimeo-7207609.jpg"/>
When i use firebug to see output i get:
<a class="emvideo-thumbnail-replacement emvideo-modal-lightbox2 lightbox2 lightbox-processed emvideo-thumbnail-replacement-processed views-processed" href="/littlebleufilms/emvideo/modal/93/400/267/field_embedded_video/vimeo/7207609" title=" Training Day " rel="283;]"><span/><img width="200" height="135" src="http://3rwebdesign.com/littlebleufilms/sites/default/files/emvideo-vimeo-7207609.jpg" alt="Thumbnail Not Available" title="Thumbnail Not Available"/>
</a>
you'll see the rel="lightframe[]" is breaking
#15
I'm having the same problem, it only works if I'm not using any filters (ie: PHP mode... which is obviously not very useful for a community site :) But we're talking about a bigger issue here - allowing certain characters or attributes within an input format that is not as granular as individual HTML attributes, only tags. It's stripping it because it looks like javascript.
#16
It's a little off-putting that this important views compatibility issue has not yet been resolved.
Can we get Lightbox2 to support something other than square-bracketed options that interfere with views, like:
rel="lightvideo{|width:400px;height:300px;}{caption}" or whatever????!
#17
It happens because of the colon separators in the style part. You could get around it by allowing an alternative separator, such as an equal sign (which worked for me, with a small change to the "setStyles" function in "lightbox.js" in 6.x-1.x-dev (I think the latest release)).