In function flickr_filter_split_config a preg_match_all using the regex '/([a-zA-Z]+)=([-@0-9a-zA-Z:;]+)/' appears to be used to parse the parameters passed.

The statement is

preg_match_all('/([a-zA-Z]+)=([-@0-9a-zA-Z:;]+)/', $string, $parts, PREG_SET_ORDER);

I would like to be able to pass more than one class to the filter, but when passed as

[flickr-photo:id=nnn,size=m,class=class1 class2]

only the first class is handled.

When passed as

[flickr-photo:id=nnn,size=m,class="class1 class2"] or
[flickr-photo:id=nnn,size=m,class='class1 class2']

no class information makes it through.

Is this a fixable problem or should I work on the basis that multiple classes can not be passed?

https://drupal.org/node/147152#comment-561346 seems to indicate that multiple classes should be possible, though this was posted quite a while ago.

Thanks,

Alan

CommentFileSizeAuthor
#2 multiple_css_classes-2116165-2.patch974 byteslolandese

Comments

lolandese’s picture

Sorry for getting back on this with delay.

Is this a fixable problem or should I work on the basis that multiple classes can not be passed?

No, this should get fixed.

Thanks for your background info. I will try to look into it asap. If meanwhile you found other clues, please let me know.

lolandese’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new974 bytes

Solved by adding a space. :-\

Your syntax has to look like:
[flickr-photo:id=9247386562, size=m, class=foo bar, style=float:left;]
Thus without quotes.

Anonymous’s picture

lolandese,

Sorry about the delay in getting back - your patch works fine and I'm now able to pass through additional css classes.

Thanks a lot for your help with this, it's much appreciated,

Alan

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community
lolandese’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.