Download & Extend

inline-even and inline-odd css classes for images

Project:Inline
Version:5.x-1.1
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

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

AttachmentSize
inline.patch1.07 KB

Comments

#1

sorry, the first patch was wrong

AttachmentSize
inline.patch 1.09 KB

#2

Newbie here:

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

#3

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

#4

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.