Hello!

This small patch adds inline-odd and inline-even css classes to the images. This is usefull for news sites where the align of the images depends on their order.

See also: http://drupal.org/node/153206

yours,
pentike

CommentFileSizeAuthor
#1 inline.patch1.09 KBpentike
inline.patch1.07 KBpentike

Comments

pentike’s picture

StatusFileSize
new1.09 KB

sorry, the first patch was wrong

mbeenon’s picture

Newbie here:

Where would you place that patch? I'd also like my image to appear inline with each other.

sun’s picture

Status: Needs review » Needs work

Sorry, but this patch is horrible.

+$evenimage = false;
 function theme_inline_img($file, $field) {
+  global $evenimage;

Globals are out of bounds and should only be considered for situations in which nothing else is possible. See also http://drupal.org/coding-standards

+      array('class' => $evenimage ? 'inline, inline-even':'inline, inline-odd')

CSS classes are not and have never been delimited by commas.

+  $evenimage = $evenimage ? false : true; 

We use uppercase booleans. See http://drupal.org/coding-standards

sun’s picture

Status: Needs work » Closed (duplicate)

Thanks for taking the time to report this issue.

However, marking as duplicate of #153206: Better CSS classes for images (even/odd/# + custom?).
You can follow up on that issue to track its status instead. If any information from this issue is missing in the other issue, please make sure you provide it over there.