Right now, you can chose between either left or right alignment. There is currently no way to place an image that text does not wrap around.

CommentFileSizeAuthor
#4 img_assist.align.patch543 bytessun
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Zach Harkey’s picture

Title: Allow for no alignment » Allow admins to add (classes) to the alignment options

For 4.6 I hacked a "center" option which I used to achieve this, however, I've been thinking about this recently and I think the most awesome way to handle this would be to allow the admin the advanced option of entering a list of class attributes that they want to offer their users. This would drastically increase the value of this module for almost anything. For example, instead of just right or left, what if they could choose from a list like:

feature
mugshot
detail
inset
author
logo
etc

To take this a step further we could also allow the admin to specify a separate label and class by way of some kind of simple markup e.g.

Label (classes)
----------------------------------------
Inset right (inset-right)
Inset left (inset-left)
Screenshot (screenshot)
Feature (feature)
Detail (detail)
Author's photo (author)
Client Logo (client-logo)
Project Logo (project-logo)

Not only does this allow a sick amount of design options, but it gives us the option of removing design decisions from the user: what is this photo? instead of just which way should it line up.

Most importantly, this seems like a pretty easy feature to add from a code standpoint, no?

-Zach

benshell’s picture

Category: bug » feature

I've thought about this, Zach. It's a good idea, but it would be a lot of work to do right. It wouldn't be as simple as a list of CSS styles, because each one of those styles (Author's Photo, Client's Logo, etc) should also be separately themeable in PHP (not just CSS). For example, some might not use the caption, others might be a differrent size, etc. I'm all for it if someone wants to do the coding, However, I'm insanely busy so this is probably something I won't get around to very soon.

mikl’s picture

Would it be possible just to add a class selection dialog - the outline on pictures is good in most places, but not good in others, and the way it is now, there's no real way to change it...

sun’s picture

Title: Allow admins to add (classes) to the alignment options » Allow no alignment
Status: Active » Reviewed & tested by the community
FileSize
543 bytes

Keep it simple, guys. This is obviously needed, so the attached patch adds a new option "none" to the alignment list. Theming is up to the designer who may cares about class="inline none".
Since it's a simple addition and it is working like a breeze, I'm setting this issue to ready to be committed.

corris’s picture

I agree with this option for the drop down. I also think 'none' should be default. when will this patch go in to cvs?

sun’s picture

Created an offshoot for custom image styles: http://drupal.org/node/71630

Fluence’s picture

for my own use, I added 'top' and 'bottom' by changing the line in question to:

'#options' => array('left'=>'left', 'right'=>'right', 'top'=>'top', 'bottom'=>'bottom'),

manuj_78’s picture

Can someone tell us when and if these updates are going to become available.

sun’s picture

Patch still applies to img_assist in CVS. This feature is already heavily used on several of my deployed Drupal sites.

manuj_78’s picture

Sun,
I dont know the cvs program and hence dont know how to apply the patch. Can you please tell me what change in code i need to do and I will do it manually.

Manuj

sun’s picture

Assigned: Unassigned » sun

Click on the attached patch of #4. It describes the code change in img_assist.module near line 850.

@benshell, could you please commit this?

Darren Oh’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in CVS commit 46530.

Anonymous’s picture

Status: Fixed » Closed (fixed)