so i just posted this question: http://drupal.org/node/318697 - about (in summary) a user putting in a link to an external image that appears in a node BUT if it's huge, it breaks the theme completely...

...i began to think that this is really a theming issue because the theme styling for nodes/content should define a maximum width for the body - not sure what this means though (like resizing, scaling, cropping??) no idea what this actually entails, but feels like something that should be a theme thing, not a module thing

...or am i wrong? if not, anybody who lets users embed a link to external images (e.g. picasa, flickr, whatever) is at risk of completely breaking the theme - it's very easy to do, just try sharing a full size image capture of your desktop ;)

...i understand that css-resized images aren't ideal - that's why we've got amazing modules like imagecache - but since your theme is fixed width, wouldn't it be reasonable to set a max width equal to (at most) the center column with only one sidebar in place (versus with both) - not sure if this then screws up a handful of imagecache users or others who show zero columns on image pages, but that may require a little survey of some kind...or perhaps an admin option in the theme's configuration (e.g. pick one of three: image max width = full page, center with both columns, page with only one column)

Comments

zilla’s picture

...also brought this up within the BUEditor support forum as well as it appears that perhaps this could be modified for my specific needs as on my site images this way are only coming through bueditor right now (though a user *could* cut and paste embed code for an image or write out the tags manually - in which case the issue moves back to this theme!!!)

any ideas?

a class in css? does IE even respect maxwidth type settings?

jwolf’s picture

Assigned: Unassigned » jwolf

This theme uses fixed widths; using a max-width will not accomplish anything. The issue is not that the element is dynamically expanding but that the content is overflowing. Therefore, a modest use of overflow:hidden will help prevent oversize images and/or long text from overflowing and breaking the layout.

As for resizing images, you might want to make proper use of one of the many contrib modules that specializes in image management and/or manipulation. In this case, using CSS to resize images is not an appropriate solution. Personally, I strongly favor ImageCache for reszing images. ImageCache is great becasue of its functionality and flexibility. You can programatically implement presets w/in your content types (e.g., node-story.tpl.php).

For example:

<?php print theme('imagecache', 'teaser', $node->field_image[0]['filepath'],$node->field_image[0]['title'],$node->field_image[0]['alt']); ?>

See Imagecache: dynamic image manipulation for more info.

For the next release there will be a fix for content overflowing, not just for the main content but also for sidebars and blocks.

Thanks for pointing this out.

minesota’s picture

Subscribed.

zilla’s picture

@jwolf - thank you so much for the explanation!! i'm using imagecache now to handle all of those presets and it works perfectly..

my problem exists within nodes themselves where a user is allowed to embed an image or video from an external site - not an issue for youtube or sites like that, but a huge problem if somebody randomly puts up an embedded huge image!

regarding overflow:hidden - how would i put something like this into the css? or should i just wait - it sounds like you're going to include this in the next release...

thanks for tackling all of these problems. this is absolutely the most flexible and impressive theme i've seen for drupal in years...

minesota’s picture

>regarding overflow:hidden - how would i put something like this into the css?

For example :

.node {
width: auto;
max-width: 900px;
background :yellow;
overflow: hidden;
border : 1px solid;
float: left;
}

zilla’s picture

@minesota - thank you. it also sounds like this will be fixed into the core css shortly (including support for all content items, blocks etc)

jwolf’s picture

Status: Active » Fixed

Fixed with the release of acquia_marina 6.x-1.2

zilla’s picture

you're awesome jwolf!! thanks. gonna try now and will circle around if it's still odd...

edit: works PERFECTLY

also, using this with BUEditor and it's excellent - if a user leaves H and W blank, this handles resizing automagically to put in box handling overflow, or they can set alignment options and resize manually...

actually quite useful for my own editing purposes with external image file folders...

zilla’s picture

one tiny item: just noticed this...

when i have the left sidebar visible (blocks) and am in safari (only using that right now, not sure about other browsers) and i go to a content type and click on manage fields and then "display fields", if the options are wide (like one is "Lightbox2:longpresetname>original"), the tiny up/down arrows on outer right edge are cropped/hidden - though it of course still works by simply clicking on the box itself...just seems to cut off about 5 or 10 pixels too soon...

zilla’s picture

second item: if generic video site size formats are tossed into nodes with three columns on the page (first and last sidebar and main content), standard embed codes from youtube and other major sites (all same dimensions) appear to be off by just a few pixels and so push "sidebar last" above the node

i know that this is really NOT your issue as it is handling the overlow by moving blocks out of the way, but just wanted to give you a headsup because a lot of folks let users paste youtube embed codes (or break.com, or others) and you may hear about this again months down the road...

is there a way to handle embed resizing within the theme such that it blankets all embeds (videos or whatever)?

Anonymous’s picture

Status: Fixed » Closed (fixed)

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